A
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
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