Wednesday, 15 February 2012

How to assign value to public variable in asp.net at runtime? -



How to assign value to public variable in asp.net at runtime? -

public class index inherits system.web.ui.page dim arr(9) integer protected sub page_load(byval sender object, byval e eventargs) handles me.load arr(0) = 23 end sub protected sub bntinsert_click(byval sender object, byval e eventargs) handles bntinsert.click arr(0) = 999 end sub protected sub bntshow_click(byval sender object, byval e eventargs) handles bntshow.click txtid.text = arr(0).tostring end sub end class

the result when click on bntinsert , after bntshow still show value "23" in txtid. please help me!

1: asp.net stateless. 2: check post-back events?

protected sub page_load(byval sender object, byval e eventargs) handles me.load if page.ispostback arr(0) = 23 end if end sub

asp.net

No comments:

Post a Comment