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. Page Redirect

Page Redirect

Scheduled Pinned Locked Moved ASP.NET
helptutorial
11 Posts 6 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.
  • J Offline
    J Offline
    janani13
    wrote on last edited by
    #1

    Hi all, I want to redirect to the called page(aaa.aspx) after i logged in.By default i redirected to some other page(bbb.aspx).How to redirect to the called page .Please help me..

    S V J A 4 Replies Last reply
    0
    • J janani13

      Hi all, I want to redirect to the called page(aaa.aspx) after i logged in.By default i redirected to some other page(bbb.aspx).How to redirect to the called page .Please help me..

      V Offline
      V Offline
      Vimalsoft Pty Ltd
      wrote on last edited by
      #2

      Response.Redirect("aaa.aspx",false);

      Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.com vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

      J 1 Reply Last reply
      0
      • J janani13

        Hi all, I want to redirect to the called page(aaa.aspx) after i logged in.By default i redirected to some other page(bbb.aspx).How to redirect to the called page .Please help me..

        S Offline
        S Offline
        sashidhar
        wrote on last edited by
        #3

        Try To add the code in

        protected void Login1_LoggedIn(object sender, EventArgs e)
        {
        Response.Redirect("yourPage.aspx");
        }

        MyFirstArticle MenuControlSelectedItem Why Do Some People Forget To Mark as Answer .If It Helps.

        1 Reply Last reply
        0
        • V Vimalsoft Pty Ltd

          Response.Redirect("aaa.aspx",false);

          Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.com vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

          J Offline
          J Offline
          John ph
          wrote on last edited by
          #4

          I guess, the question is "how to redirect to the requested page instead of default page after login?"

          - Regards -
             J O N


          A good thing is a bad thing if it keeps you from the best thing. - Dr. Adrian Rogers


          V 1 Reply Last reply
          0
          • J John ph

            I guess, the question is "how to redirect to the requested page instead of default page after login?"

            - Regards -
               J O N


            A good thing is a bad thing if it keeps you from the best thing. - Dr. Adrian Rogers


            V Offline
            V Offline
            Vimalsoft Pty Ltd
            wrote on last edited by
            #5

            What is wrong with the answer i gave ?

            Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.com vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

            C 1 Reply Last reply
            0
            • J janani13

              Hi all, I want to redirect to the called page(aaa.aspx) after i logged in.By default i redirected to some other page(bbb.aspx).How to redirect to the called page .Please help me..

              J Offline
              J Offline
              John ph
              wrote on last edited by
              #6

              check for Request.QueryString["ReturnURL"] != null to redirect to the requested PageURL

              if (Request.QueryString["ReturnUrl"] != null)
              {
              Response.Redirect(Request.QueryString["ReturnUrl"]);
              }
              else
              {
              Response.Redirect("default.aspx");
              }

              - Regards -
                 J O N


              A good thing is a bad thing if it keeps you from the best thing. - Dr. Adrian Rogers


              1 Reply Last reply
              0
              • J janani13

                Hi all, I want to redirect to the called page(aaa.aspx) after i logged in.By default i redirected to some other page(bbb.aspx).How to redirect to the called page .Please help me..

                A Offline
                A Offline
                Abhishek Sur
                wrote on last edited by
                #7

                I would recommend to use Server.Transfer from aaa.aspx. :)

                Abhishek Sur


                My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB

                **Don't forget to click "Good Answer" if you like to.

                J 1 Reply Last reply
                0
                • A Abhishek Sur

                  I would recommend to use Server.Transfer from aaa.aspx. :)

                  Abhishek Sur


                  My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB

                  **Don't forget to click "Good Answer" if you like to.

                  J Offline
                  J Offline
                  janani13
                  wrote on last edited by
                  #8

                  Thank you all for your response.I got idea from the answers.

                  S A 2 Replies Last reply
                  0
                  • J janani13

                    Thank you all for your response.I got idea from the answers.

                    S Offline
                    S Offline
                    sashidhar
                    wrote on last edited by
                    #9

                    All :thumbsup:The Best

                    MyFirstArticle MenuControlSelectedItem Why Do Some People Forget To Mark as Answer .If It Helps.

                    1 Reply Last reply
                    0
                    • J janani13

                      Thank you all for your response.I got idea from the answers.

                      A Offline
                      A Offline
                      Abhishek Sur
                      wrote on last edited by
                      #10

                      Yes. This is cool. But seems that you gave me "Bad Answer". Is there any reason for that. I think if you are in a page already you dont need to Redirect again. :laugh:

                      Abhishek Sur


                      My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB

                      **Don't forget to click "Good Answer" if you like to.

                      1 Reply Last reply
                      0
                      • V Vimalsoft Pty Ltd

                        What is wrong with the answer i gave ?

                        Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.com vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

                        C Offline
                        C Offline
                        Christian Graus
                        wrote on last edited by
                        #11

                        It doesn't help at all. He wants his page to redirect to the login, and then whatever page the user went to, it goes back to.

                        Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

                        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