I've got a strange problem. I have server controls in my .aspx page, but they don't seem to fire up.
For example, I have two controls, button1 and button2. When I click on button1, button2.visible = false.
If I put that code in the button1_click procedure it doesn't do much:
However, when I put the Button2.Visible = False in the page load sub procedure, it does get executed (when the page loads)
Any reason why?
For example, I have two controls, button1 and button2. When I click on button1, button2.visible = false.
If I put that code in the button1_click procedure it doesn't do much:
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Button2.Visible = False
End Sub
However, when I put the Button2.Visible = False in the page load sub procedure, it does get executed (when the page loads)
Code:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
.....
Button2.Visible = False
....
Any reason why?