Usercontrol does not refresh.

Discussion in '.NET' started by mggarcia, May 21, 2006.

  1. mggarcia

    mggarcia

    Joined:
    May 21, 2006
    Messages:
    1
    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
     
    mggarcia, May 21, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. huobazi
    Replies:
    1
    Views:
    740
    David Waz...
    Jul 3, 2003
  2. vatech1993@yahoo.com

    Event not firing in usercontrol inside usercontrol

    vatech1993@yahoo.com, Dec 10, 2004, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    205
    vatech1993@yahoo.com
    Dec 10, 2004
  3. vatech1993@yahoo.com

    Event not firing in usercontrol inside usercontrol

    vatech1993@yahoo.com, Dec 10, 2004, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    208
    vatech1993
    Dec 11, 2004
  4. vatech1993@yahoo.com

    Event not firing in usercontrol inside usercontrol

    vatech1993@yahoo.com, Dec 10, 2004, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    180
    vatech1993@yahoo.com
    Dec 10, 2004
  5. Kan Grewal

    Web Usercontrol in a Web Usercontrol not displaying...

    Kan Grewal, Jul 6, 2004, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    134
    Kan Grewal
    Jul 7, 2004
Loading...

Share This Page