473,498 Members | 1,704 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to pass value along with click of a button

Al
Ref:how to pass value along with click of a button
hi,I have created a form that has single button. as follow
<asp:button id="btnCallfunction" runat="server"
text="func_call" onclick="add_int" />

Sub func_call(Source As Object, E As EventArgs)
' how to capture the passed variable here

end Sub

This works if I am calling it from another function, but
caused me an error when I call it from the above btn
Error is Method 'Public fun_call(strid as integer does not
have the same signature as delegate "Delegate Sub
EventHandler(sender as Object, e AS system.EventArgs)

Sub func_call(strid as integer)
dim vid = strid
process vid
end sub

So what can I do if I want to call a function by clicking
a button in asp.net form and pass a value to the function
to process it.thanks for your help.
Al
Jul 21 '05 #1
1 2131
Store it as a Session variable, your function/sub can referernce it from
there.... Session("SomeStorage") = WhateverYouWantBehindClick

Then to dereference it:

SomeObject = CTYPE(Session("SomeStorage"), SomeObjectsType)
"Al" <aa********@yahoo.com> wrote in message
news:0f****************************@phx.gbl...
Ref:how to pass value along with click of a button
hi,I have created a form that has single button. as follow
<asp:button id="btnCallfunction" runat="server"
text="func_call" onclick="add_int" />

Sub func_call(Source As Object, E As EventArgs)
' how to capture the passed variable here

end Sub

This works if I am calling it from another function, but
caused me an error when I call it from the above btn
Error is Method 'Public fun_call(strid as integer does not
have the same signature as delegate "Delegate Sub
EventHandler(sender as Object, e AS system.EventArgs)

Sub func_call(strid as integer)
dim vid = strid
process vid
end sub

So what can I do if I want to call a function by clicking
a button in asp.net form and pass a value to the function
to process it.thanks for your help.
Al

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5787
by: Terry | last post by:
hi, could any1 help me with this? There're one button and one textbox on Page A. click the button: <Code Behind > Dim ClientScript As String = ""
3
32119
by: DCB | last post by:
Hello. I have an easy question, likely, that has me in a headspin. I have an include file to a frames based site that basically forces frames on the end user if they visit the site and hit a...
1
318
by: Al | last post by:
Ref:how to pass value along with click of a button hi,I have created a form that has single button. as follow <asp:button id="btnCallfunction" runat="server" text="func_call" onclick="add_int" />...
6
2250
by: Joseph Geretz | last post by:
Writing an Outlook AddIn with C#. For the user interface within Outlook I'm adding matching pairs of Toolbar buttons and Menu items. All of the buttons and menu items are wired up to send events to...
3
1790
by: Sharon | last post by:
hello all, I was successfull in passing one value from first webpage to second webpage, but not sure how to pass three textbox values from the first page to the second page. Below is the code i...
4
5729
by: ryang | last post by:
I'm sure this is an easy one for you old pros? I am using filemaker to browse some records, and I have created a button in my filemaker layout that launches a web browser with a certain url. Right...
19
247982
Atli
by: Atli | last post by:
Introduction At some point, all web developers will need to collect data from their users. In a dynamic web page, everything revolves around the users input, so knowing how to ask for and collect...
12
11004
by: raylopez99 | last post by:
Keywords: scope resolution, passing classes between parent and child forms, parameter constructor method, normal constructor, default constructor, forward reference, sharing classes between forms....
0
7125
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
1
6887
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7379
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4910
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4590
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3093
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1419
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
291
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.