Home All Groups Group Topic Archive Search About
Author
9 Apr 2006 8:29 PM
David Thielen
Hi;

I have a page (page X) where I want to have a "Return" button and that takes
it back to the previous page (page A) - the one (page A) that linked to this
page (page X).

Is there an easy way to get the url of page A when page X first loads?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Author
10 Apr 2006 6:34 AM
Jeffrey Tan[MSFT]
Hi dave,

Thanks for your post!

Normally, this is controlled by client side javascript code. We can use
history.go(-1) statement to implement go back function. Like below:
<script>
function goback() {
    history.go(-1);
}
</script>
<a href="javascript:goback()">Back</a>

Hope this helps!

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Author
10 Apr 2006 1:01 PM
David Thielen
Hi;

I have a situation like the login page where I may have to go to a second
page before I go back. Is there a way to get the url?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com



""Jeffrey Tan[MSFT]"" wrote:

Show quoteHide quote
> Hi dave,
>
> Thanks for your post!
>
> Normally, this is controlled by client side javascript code. We can use
> history.go(-1) statement to implement go back function. Like below:
> <script>
> function goback() {
>     history.go(-1);
> }
> </script>
> <a href="javascript:goback()">Back</a>
>
> Hope this helps!
>
> Best regards,
> Jeffrey Tan
> Microsoft Online Community Support
> ==================================================
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
Author
10 Apr 2006 2:37 PM
Phillip Williams
I usually manage this scenario programmatically in my applications where i
maintain a session variable, e.g. Session["ReturnToURL"], which can be set by
each page before redirecting the response to the next page.  Then any page
can use that variable when the user hits return to go back to the previous
page.
Show quoteHide quote
"David Thielen" wrote:

> Hi;
>
> I have a situation like the login page where I may have to go to a second
> page before I go back. Is there a way to get the url?
>
> --
> thanks - dave
> david_at_windward_dot_net
> http://www.windwardreports.com
>
>
>
> ""Jeffrey Tan[MSFT]"" wrote:
>
> > Hi dave,
> >
> > Thanks for your post!
> >
> > Normally, this is controlled by client side javascript code. We can use
> > history.go(-1) statement to implement go back function. Like below:
> > <script>
> > function goback() {
> >     history.go(-1);
> > }
> > </script>
> > <a href="javascript:goback()">Back</a>
> >
> > Hope this helps!
> >
> > Best regards,
> > Jeffrey Tan
> > Microsoft Online Community Support
> > ==================================================
> > When responding to posts, please "Reply to Group" via your newsreader so
> > that others may learn and benefit from your issue.
> > ==================================================
> > This posting is provided "AS IS" with no warranties, and confers no rights.
> >
> >
Author
10 Apr 2006 4:28 PM
David Thielen
Hi;

I've got it implemented where it looks for file.aspx?returnurl=orig.aspx and
that is working nicely. I just wondered if that was already a session
variable somewhere set by ASP.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com



Show quoteHide quote
"Phillip Williams" wrote:

> I usually manage this scenario programmatically in my applications where i
> maintain a session variable, e.g. Session["ReturnToURL"], which can be set by
> each page before redirecting the response to the next page.  Then any page
> can use that variable when the user hits return to go back to the previous
> page.
> --
> HTH,
> Phillip Williams
> http://www.societopia.net
> http://www.webswapp.com
>
>
> "David Thielen" wrote:
>
> > Hi;
> >
> > I have a situation like the login page where I may have to go to a second
> > page before I go back. Is there a way to get the url?
> >
> > --
> > thanks - dave
> > david_at_windward_dot_net
> > http://www.windwardreports.com
> >
> >
> >
> > ""Jeffrey Tan[MSFT]"" wrote:
> >
> > > Hi dave,
> > >
> > > Thanks for your post!
> > >
> > > Normally, this is controlled by client side javascript code. We can use
> > > history.go(-1) statement to implement go back function. Like below:
> > > <script>
> > > function goback() {
> > >     history.go(-1);
> > > }
> > > </script>
> > > <a href="javascript:goback()">Back</a>
> > >
> > > Hope this helps!
> > >
> > > Best regards,
> > > Jeffrey Tan
> > > Microsoft Online Community Support
> > > ==================================================
> > > When responding to posts, please "Reply to Group" via your newsreader so
> > > that others may learn and benefit from your issue.
> > > ==================================================
> > > This posting is provided "AS IS" with no warranties, and confers no rights.
> > >
> > >
Author
10 Apr 2006 9:27 PM
Steve
This works for me:

Private Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
    If Not Page.IsPostBack Then
        ' Save the referrer Url
        ViewState("ReferrerUrl") = Request.UrlReferrer.ToString()
    End If
End Sub

Protected Sub BackButton_Click(ByVal sender As Object, ByVal e As
System.EventArgs)

        Response.Redirect(ViewState("ReferrerUrl").ToString())

End Sub



Show quoteHide quote
"David Thielen" <thielen@nospam.nospam> wrote in message
news:E46C4476-6AAA-4E2B-BCFC-7495BEEED088@microsoft.com...
> Hi;
>
> I've got it implemented where it looks for file.aspx?returnurl=orig.aspx
> and
> that is working nicely. I just wondered if that was already a session
> variable somewhere set by ASP.
>
> --
> thanks - dave
> david_at_windward_dot_net
> http://www.windwardreports.com
>
>
>
> "Phillip Williams" wrote:
>
>> I usually manage this scenario programmatically in my applications where
>> i
>> maintain a session variable, e.g. Session["ReturnToURL"], which can be
>> set by
>> each page before redirecting the response to the next page.  Then any
>> page
>> can use that variable when the user hits return to go back to the
>> previous
>> page.
>> --
>> HTH,
>> Phillip Williams
>> http://www.societopia.net
>> http://www.webswapp.com
>>
>>
>> "David Thielen" wrote:
>>
>> > Hi;
>> >
>> > I have a situation like the login page where I may have to go to a
>> > second
>> > page before I go back. Is there a way to get the url?
>> >
>> > --
>> > thanks - dave
>> > david_at_windward_dot_net
>> > http://www.windwardreports.com
>> >
>> >
>> >
>> > ""Jeffrey Tan[MSFT]"" wrote:
>> >
>> > > Hi dave,
>> > >
>> > > Thanks for your post!
>> > >
>> > > Normally, this is controlled by client side javascript code. We can
>> > > use
>> > > history.go(-1) statement to implement go back function. Like below:
>> > > <script>
>> > > function goback() {
>> > >     history.go(-1);
>> > > }
>> > > </script>
>> > > <a href="javascript:goback()">Back</a>
>> > >
>> > > Hope this helps!
>> > >
>> > > Best regards,
>> > > Jeffrey Tan
>> > > Microsoft Online Community Support
>> > > ==================================================
>> > > When responding to posts, please "Reply to Group" via your newsreader
>> > > so
>> > > that others may learn and benefit from your issue.
>> > > ==================================================
>> > > This posting is provided "AS IS" with no warranties, and confers no
>> > > rights.
>> > >
>> > >