473,320 Members | 2,073 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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 2104
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
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
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
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
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
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
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
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
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
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.