I tested your codes in Ajax RC 1.0 and found the same issue as yours.The Page_Load event handler of content page is prior to that of master Page while you set session variable value through a button click event handler in the master page,so you can get the session variable value when press the menu for the second time.
If you remove the following codes from?Page_InitComplete?event?handler?to?a?button?click?event?handler?in?content?page,it?
should?work?fine.
Button Click Event Handler:
If Session.Item("a") = Nothing Or Session.Item("a") = "1"
Then
????ph1.Controls.Clear()
????ph1.Controls.Add(LoadControl("user.ascx"))
Else
????ph1.Controls.Clear()
????ph1.Controls.Add(New TextBox())
End If
Wish the above can help you.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment