asp:Button

puf79

New Member
Can I pass constants with button clicks e.g<BR><BR><asp:button id="mybutton" text"blah" onClick="Sum(5)" runat="server"/><BR><BR>where Sum is<BR>Sum(sender As Object, e As EventArgs,var As Integer)Why don't you try it and tell usI think it's safe to say it doesn't workThat's because the event handler is passed the object and the event args... The OnClick property tells your app which event handler to call, it isn't actually calling the function, so passing it a parameter won't work. Look into using the CommandName and CommandArgument properties of a button. I think this will help you.
 
Back
Top