response.redirect

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dave

    response.redirect

    I'm using VB.NET 2003.

    I can send a user back one page with this command:
    Response.Redire ct(Request.Serv erVariables("HT TP_REFERER").

    Is there a simple way to send him back two pages?

    Thanks,

    Dave


  • Dan

    #2
    Re: response.redire ct

    "Dave" <dave_Please_re ply_to_group_on ly@stic.net> wrote in message
    news:eRdm2hBUFH A.2124@TK2MSFTN GP14.phx.gbl...[color=blue]
    > I'm using VB.NET 2003.
    >
    > I can send a user back one page with this command:
    > Response.Redire ct(Request.Serv erVariables("HT TP_REFERER").
    >
    > Is there a simple way to send him back two pages?
    >[/color]

    Use Javascript:

    Response.Write "<script language=javasc ript> history.back(-2); </script>"

    HTH


    Comment

    • Scott M.

      #3
      Re: response.redire ct

      The server doesn't know about anything further back than the page you just
      came from. You need client-side code (as provided in the other reply)
      because only the browser knows its own history.


      "Dave" <dave_Please_re ply_to_group_on ly@stic.net> wrote in message
      news:eRdm2hBUFH A.2124@TK2MSFTN GP14.phx.gbl...[color=blue]
      > I'm using VB.NET 2003.
      >
      > I can send a user back one page with this command:
      > Response.Redire ct(Request.Serv erVariables("HT TP_REFERER").
      >
      > Is there a simple way to send him back two pages?
      >
      > Thanks,
      >
      > Dave
      >
      >[/color]


      Comment

      • Dave

        #4
        Re: response.redire ct

        Yes, sir, I like that!

        Thanks.

        Dave


        "Dan" <daniel_c_hate_ spam@NoSpam_myr ealbox.com> wrote in message
        news:ugfGQjBUFH A.752@TK2MSFTNG P10.phx.gbl...[color=blue]
        > "Dave" <dave_Please_re ply_to_group_on ly@stic.net> wrote in message
        > news:eRdm2hBUFH A.2124@TK2MSFTN GP14.phx.gbl...[color=green]
        > > I'm using VB.NET 2003.
        > >
        > > I can send a user back one page with this command:
        > > Response.Redire ct(Request.Serv erVariables("HT TP_REFERER").
        > >
        > > Is there a simple way to send him back two pages?
        > >[/color]
        >
        > Use Javascript:
        >
        > Response.Write "<script language=javasc ript> history.back(-2); </script>"
        >
        > HTH
        >
        >[/color]


        Comment

        • Herfried K. Wagner [MVP]

          #5
          Re: response.redire ct

          "Dan" <daniel_c_hate_ spam@NoSpam_myr ealbox.com> schrieb:[color=blue][color=green]
          >> I'm using VB.NET 2003.
          >>
          >> I can send a user back one page with this command:
          >> Response.Redire ct(Request.Serv erVariables("HT TP_REFERER").
          >>
          >> Is there a simple way to send him back two pages?[/color]
          >
          > Use Javascript:
          >
          > Response.Write "<script language=javasc ript> history.back(-2); </script>"[/color]

          .... which won't work if JavaScript is disabled on the client.

          --
          M S Herfried K. Wagner
          M V P <URL:http://dotnet.mvps.org/>
          V B <URL:http://classicvb.org/petition/>

          Comment

          • Cor Ligthert

            #6
            Re: response.redire ct

            Herfried,
            [color=blue][color=green]
            >> Use Javascript:
            >>
            >> Response.Write "<script language=javasc ript> history.back(-2); </script>"[/color]
            >
            > ... which won't work if JavaScript is disabled on the client.
            >[/color]
            Than probably nothing will work with ASPX. An aspx page is completly build
            around JavaScript.(In standard setting, it can AFAIK also be VBScript,
            however that I never tried)

            :-)

            Cor


            Comment

            • Cor Ligthert

              #7
              Re: response.redire ct

              Scott,
              [color=blue]
              > The server doesn't know about anything further back than the page you just
              > came from. You need client-side code (as provided in the other reply)
              > because only the browser knows its own history.[/color]

              The server knows only what it has in his session.items, cache or shared
              classes (the last two shared for all active clients from the application).
              There is no page information at all on the server.

              Cor


              Comment

              • Scott M.

                #8
                Re: response.redire ct

                Uh, no it's not. It is terribly inaccurate to say that ASP.NET is
                "completely built around JavaScript". There is nothing in the architecture
                that is JavaScript based.

                JavaScript is used by the validation controls and some of the page
                properties, but you can certainly work with ASP.NET and have the bulk of its
                functionality available with scripting turned off.


                "Cor Ligthert" <notmyfirstname @planet.nl> wrote in message
                news:%23399MAHU FHA.3620@TK2MSF TNGP09.phx.gbl. ..[color=blue]
                > Herfried,
                >[color=green][color=darkred]
                >>> Use Javascript:
                >>>
                >>> Response.Write "<script language=javasc ript> history.back(-2);
                >>> </script>"[/color]
                >>
                >> ... which won't work if JavaScript is disabled on the client.
                >>[/color]
                > Than probably nothing will work with ASPX. An aspx page is completly build
                > around JavaScript.(In standard setting, it can AFAIK also be VBScript,
                > however that I never tried)
                >
                > :-)
                >
                > Cor
                >[/color]


                Comment

                • Scott M.

                  #9
                  Re: response.redire ct

                  Cor, you are incorrect. The HTTPRequest object exposes the ServerVariables
                  collection which contains environmental information about both the client
                  and the server and includes the current document's referring page.


                  "Cor Ligthert" <notmyfirstname @planet.nl> wrote in message
                  news:ejqoTCHUFH A.3344@TK2MSFTN GP10.phx.gbl...[color=blue]
                  > Scott,
                  >[color=green]
                  >> The server doesn't know about anything further back than the page you
                  >> just came from. You need client-side code (as provided in the other
                  >> reply) because only the browser knows its own history.[/color]
                  >
                  > The server knows only what it has in his session.items, cache or shared
                  > classes (the last two shared for all active clients from the application).
                  > There is no page information at all on the server.
                  >
                  > Cor
                  >[/color]


                  Comment

                  • M. Posseth

                    #10
                    Re: response.redire ct


                    This is turning into a nice discussion :-)

                    But i think it all mathers on how you code cause my websites for instance
                    know more about the client as should be possible refering the below
                    statements
                    How ??? well a nice SQL server does the trick.....

                    Regarding the Javascript ???? Oh God I wish it was pure Javascript 1.2 that
                    Microsoft uses in ASP.Net controls
                    well surprise !!!! it isn`t Javascript it is Jscript ( Microsoft`s own
                    implementation )

                    How do i know that ?? well my biggest web project until so far (
                    http://www.tireponline.de ) is made for one of our customers who needed a
                    platform independent website ( Windows \ Linux )
                    well i got the Job and i know now why other software company`s smiled and
                    said goodbye :-) .

                    Cause i really had to reinvent the weel for a lot of standard functionality
                    because it did not work on Mozilla \ Conqueror

                    While i prooved that it is good possible to make a true platform independent
                    website ,,,, however it requires some thorough knowledge of javascript

                    M. Posseth [MCP Developer]






                    "Scott M." <s-mar@nospam.nosp am> wrote in message
                    news:eY6aVYQUFH A.2124@TK2MSFTN GP14.phx.gbl...[color=blue]
                    > Cor, you are incorrect. The HTTPRequest object exposes the[/color]
                    ServerVariables[color=blue]
                    > collection which contains environmental information about both the client
                    > and the server and includes the current document's referring page.
                    >
                    >
                    > "Cor Ligthert" <notmyfirstname @planet.nl> wrote in message
                    > news:ejqoTCHUFH A.3344@TK2MSFTN GP10.phx.gbl...[color=green]
                    > > Scott,
                    > >[color=darkred]
                    > >> The server doesn't know about anything further back than the page you
                    > >> just came from. You need client-side code (as provided in the other
                    > >> reply) because only the browser knows its own history.[/color]
                    > >
                    > > The server knows only what it has in his session.items, cache or shared
                    > > classes (the last two shared for all active clients from the[/color][/color]
                    application).[color=blue][color=green]
                    > > There is no page information at all on the server.
                    > >
                    > > Cor
                    > >[/color]
                    >
                    >[/color]


                    Comment

                    • Cor Ligthert

                      #11
                      Re: response.redire ct

                      Michael,

                      Are you sure of that, when I open a generated ASPX page, than I only see on
                      the pages JavaScript, I was already much longer suprised that that was not
                      JScript.

                      What statements are it in particular that are JScript?

                      Cor


                      Comment

                      • Cor Ligthert

                        #12
                        Re: response.redire ct

                        Scott,
                        [color=blue]
                        > Cor, you are incorrect. The HTTPRequest object exposes the
                        > ServerVariables collection which contains environmental information about
                        > both the client and the server and includes the current document's
                        > referring page.
                        >
                        >[/color]
                        You are correct I should have added, "when there is from the session no page
                        active on the server.

                        However I added it to your page and was refering to your part. "The server
                        doesn't know about anything further back than the page you just came from."

                        When it is not that situation (there is no page active from the session)
                        than starts my part of the message.
                        "The server knows only what it has in his session.items, cache or shared
                        classes"

                        I agree that you can read it in another way.

                        Cor


                        Comment

                        • Scott M.

                          #13
                          Re: response.redire ct

                          If you take a look at the .js files that are used by ASP.NET (ie.
                          C:\Inetpub\wwwr oot\aspnet_clie nt\system_web\1 _1_4322_0\WebUI Validation.js),
                          you will see that JScript elements are used throughout them (ie.
                          document.all).


                          "Cor Ligthert" <notmyfirstname @planet.nl> wrote in message
                          news:ej3OD5FVFH A.3292@TK2MSFTN GP14.phx.gbl...[color=blue]
                          > Michael,
                          >
                          > Are you sure of that, when I open a generated ASPX page, than I only see
                          > on the pages JavaScript, I was already much longer suprised that that was
                          > not JScript.
                          >
                          > What statements are it in particular that are JScript?
                          >
                          > Cor
                          >[/color]


                          Comment

                          • Cor Ligthert

                            #14
                            Re: response.redire ct

                            Scott,

                            It can be that Michael means that with his message, I saw that document.all
                            is compatible with ECMA 262.

                            I suppose that it probably works on 99% of all browsers.
                            (However it is as written JScript. I was more thinking on not cmpatible
                            parts).

                            When the client is today still thinking about Netscape on Apple, than he
                            probably has been frozen in and is just awaked.

                            Just my thougt,

                            Cor


                            Comment

                            • Scott M.

                              #15
                              Re: response.redire ct

                              document.all is NOT defined in ECMA-262, it is proprietary to Microsoft's
                              JScript, which is why a most simple JavaScript browser detection scripts for
                              MSIE use:

                              if(document.all )
                              {
                              // browser is IE
                              }
                              else if(document.lay ers)
                              {
                              //browser is NS
                              }

                              I think what you saw was that JScript's document.all is compatible with
                              ECMA-262 in the sense that ECMA Script has:

                              document.getEle mentsByTagName( "*")

                              which does the same thing as document.all.

                              As for Netscape, it isn't just for Apple machines, it can be used on Windows
                              as well. There are quite a bit of Netscape users out there and so, for
                              publicly facing sites, we must accommodate them.





                              "Cor Ligthert" <notmyfirstname @planet.nl> wrote in message
                              news:uwrZiaSVFH A.3584@TK2MSFTN GP14.phx.gbl...[color=blue]
                              > Scott,
                              >
                              > It can be that Michael means that with his message, I saw that
                              > document.all is compatible with ECMA 262.
                              >
                              > I suppose that it probably works on 99% of all browsers.
                              > (However it is as written JScript. I was more thinking on not cmpatible
                              > parts).
                              >
                              > When the client is today still thinking about Netscape on Apple, than he
                              > probably has been frozen in and is just awaked.
                              >
                              > Just my thougt,
                              >
                              > Cor
                              >[/color]


                              Comment

                              Working...