Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Login Control page redirect to login.aspx

Login Control page redirect to login.aspx

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nettutorial
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sarfaraj Ahmed
    wrote on last edited by
    #1

    Hi im using asp.net login control on my website what im trying to is.... automaticaly check wheather someone login or not on default page . If not login then page will automatic redirect to login.aspx and after login page will redirect to default page. I dont want to click login to go to login.aspx Any instruction or example will be helpful Thanks in advance

    Sarfarj Ahmed

    A 1 Reply Last reply
    0
    • S Sarfaraj Ahmed

      Hi im using asp.net login control on my website what im trying to is.... automaticaly check wheather someone login or not on default page . If not login then page will automatic redirect to login.aspx and after login page will redirect to default page. I dont want to click login to go to login.aspx Any instruction or example will be helpful Thanks in advance

      Sarfarj Ahmed

      A Offline
      A Offline
      AhsanS
      wrote on last edited by
      #2

      What i understand from you statement is that if a user is not logged in to the site it should redirect to login.aspx page. I would recommend you to read forms authentication and use it.

      Ahsan Ullah Senior Software Engineer

      S 1 Reply Last reply
      0
      • A AhsanS

        What i understand from you statement is that if a user is not logged in to the site it should redirect to login.aspx page. I would recommend you to read forms authentication and use it.

        Ahsan Ullah Senior Software Engineer

        S Offline
        S Offline
        Sarfaraj Ahmed
        wrote on last edited by
        #3

        Thnaks for ur quick reply My master page is alraedy authinticated, if i run my website then page redirecting to login.aspx and i used the code below in master page load event If MasterLoginView.LoggedInTemplate IsNot Nothing Then Response.Redirect("login.aspx") End If on my login page i used the following code If UserNameIsValid AndAlso PasswordIsValid Then FormsAuthentication.RedirectFromLoginPage(txtUserName.Text, False) End If problem is, LoggedinTemplate showing the login name but not redirecting , still on login.aspx i changed web.config <authentication mode="Forms"> <forms cookieless="UseUri" timeout ="10" slidingExpiration ="true"/> </authentication > thanks

        Sarfarj Ahmed

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups