How to redirect from one asp.net page to another website page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • prp
    New Member
    • Mar 2007
    • 18

    How to redirect from one asp.net page to another website page

    Hi all
    There is a webpage name webform1.aspx and i want to redirect this page to the www.gmail.com . How can i do it. I have use hyperlinkbutton and Response.Redire ct("www.gmail.c om") but i have not got the actual result. Please help me.
  • skumarrcom
    New Member
    • Apr 2007
    • 2

    #2
    Originally posted by prp
    Hi all
    There is a webpage name webform1.aspx and i want to redirect this page to the www.gmail.com . How can i do it. I have use hyperlinkbutton and Response.Redire ct("www.gmail.c om") but i have not got the actual result. Please help me.
    hi

    This is a simple thing

    Response.Redire ct("http://www.google.co.i n/")

    try it

    Comment

    • prp
      New Member
      • Mar 2007
      • 18

      #3
      Originally posted by skumarrcom
      hi

      This is a simple thing

      Response.Redire ct("http://www.google.co.i n/")

      try it
      It does'nt work
      it says this The page cannot be found

      Comment

      • gomzi
        Contributor
        • Mar 2007
        • 304

        #4
        Originally posted by prp
        Hi all
        There is a webpage name webform1.aspx and i want to redirect this page to the www.gmail.com . How can i do it. I have use hyperlinkbutton and Response.Redire ct("www.gmail.c om") but i have not got the actual result. Please help me.
        Response.Redire ct("http://www.google.com" )

        even skumarrcom's reply works great!!

        post your code if it aint working still

        Comment

        • prp
          New Member
          • Mar 2007
          • 18

          #5
          Originally posted by gomzi
          Response.Redire ct("http://www.google.com" )

          even skumarrcom's reply works great!!

          post your code if it aint working still
          I have done the following code:

          Private Sub LinkButton1_Cli ck(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles LinkButton1.Cli ck
          Response.Redire ct("http://www.google.co.i n/")

          End Sub

          Comment

          • gomzi
            Contributor
            • Mar 2007
            • 304

            #6
            Originally posted by prp
            I have done the following code:

            Private Sub LinkButton1_Cli ck(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles LinkButton1.Cli ck
            Response.Redire ct("http://www.google.co.i n/")

            End Sub
            just copied your code and ran it...worked perfectly.....

            whats the error that you are getting?

            Comment

            • prp
              New Member
              • Mar 2007
              • 18

              #7
              Originally posted by gomzi
              just copied your code and ran it...worked perfectly.....

              whats the error that you are getting?
              I got page does not found error

              Comment

              • gomzi
                Contributor
                • Mar 2007
                • 304

                #8
                Originally posted by prp
                I got page does not found error
                please post the code in the aspx page.

                Comment

                • prp
                  New Member
                  • Mar 2007
                  • 18

                  #9
                  Originally posted by gomzi
                  please post the code in the aspx page.
                  I have already past that code in aspx.cs page. But still I am getting error

                  Comment

                  • gomzi
                    Contributor
                    • Mar 2007
                    • 304

                    #10
                    Originally posted by prp
                    I have already past that code in aspx.cs page. But still I am getting error
                    I think there was some misunderstandin g..what i meant was that it will be somewhat helpful if u could post the code in the aspx page. not referring to the code behind...the markup ....

                    Comment

                    • ggattani
                      New Member
                      • Sep 2010
                      • 1

                      #11
                      working perfectly fine

                      Just Copied your code ....
                      Working Abs Fine...
                      Thanks Buddy...

                      Comment

                      • Frinavale
                        Recognized Expert Expert
                        • Oct 2006
                        • 9749

                        #12
                        Are you connected to the Internet with the computer that you're developing with?

                        Response.Redire ct("http://www.google.ca") is on the Internet and if you aren't connected to it then you won't get to the page.

                        -Frinny

                        Comment

                        Working...