Usercontrol does not refresh.


Joined
May 21, 2006
Messages
1
Reaction score
0
I have a hyperlink on a header user control. When the user clicks the logout hyperlink it redirects to the main page with a parameter to logout. The main page "pageload" then logs out. There is an "if" statement on the user control to display the "Logout" hyperlink text. Please see code below. For some reason it seems that the header1.ascx runs first then the main.aspx runs. Any help will be greatly appreciated.


Main.aspx.page_load
If Not Request.Params("Logout") = "" Then
FormsAuthentication.SignOut()
End If


Header1.ascx.page_load

If HttpContext.Current.User.Identity.IsAuthenticated Then
lnkLogout.Visible = True
hyperRegisterProfile.Text = "My Profile"
Else
lnkLogout.Visible = False
hyperRegisterProfile.Text = "Register"
End If
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top