asp.net - How can I use a page_load local variable in event handler of a button -
I am creating a site in Visual Studio using VB and I have a variable in Page_load, but the event of one The handler requires the value of the button to go to session.
Any suggestions on how I can do this? Any help is appreciated
You can store a value in the CommandArgument property of a button:
btn.CommandArgument = "Your Value" and then you can remove it while handling the event:
CType (Sender, Button). You can also create a new square that increases the button and create new properties below if you need several arguments:
Class Season Button Inherits Button Grid DimSD Gid = None as a Public Property SessionBride () If nothing is the string. IISNullOrEmpty (ViewState ("Season") then s = New Good (Viewest ("Session"). ToString ()) Return & Get Set (By Value as Guitar) ViewState ("Sessionary") = Value Toastring () And Set End And Property And Class
Comments
Post a Comment