获取上一页的URL [英] Obtaining URL of previous page

查看:88
本文介绍了获取上一页的URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要捕获上一页的网址。我以为我可以找到一种方法来使用客户端代码来做b
,但我一直无法找到一种方法来做什么,所以也许就是''是一个ASP解决方案。


请注意,这是一个Intranet应用程序,因此用户将从另一个页面进入

特定页面。具体来说,我需要包含

的URL,即.asp之后的GET数据。部分。


任何可以提供帮助的代码都是受欢迎的。特定IE浏览器在这种情况下很好。


这就是我想要完成的事情:


DisplayTickets.asp有一个清单信息有一些关于

的信息,但很多门票符合搜索条件。如果用户希望分配给Bob的所有门票分别来自客户A并且在3月1日之前打开,并且在4月1日之前打开,结果将显示,每行一张,在

DisplayTickets.asp。但是,该页面的URL将比

只有DisplayTickets.asp。它将包含我刚刚描述的所有东西

用于缩小搜索范围。


在每一行中,票号都是指向页面调用

DisplayFullTickets.asp,它使用GET方法,所以它看起来像

这个:

DisplayFullTickets.asp?TicketID = 1000


由于应用程序中的其他一些规范,我必须在这里使用GET

方法。否则,我可以通过隐藏的

字段轻松解决我的问题。


现在这里的交易:老板要我做到这样当他在DisplayTickets.asp的列表中点击了一个

的票号,当他点击BACK到那个

页面后,从DisplayFullTickets.asp,他想要最近的票证

号码为红色,或以其他方式确认并显示他查看的最后一张票,这样他就可以继续下一张票了。

I need to capture the previous page''s URL. I thought I could find a way to
do it with client-side code, but I have been unable to find a way to do
that, so perhaps there''s an ASP solution.

Please note that this is for an Intranet app, so users will be coming to a
particular page from another page. Specifically, I need the URL including
the GET data that comes after the ".asp" part.

Any code which can help is welcome. IE-specific is fine in this case.

Here''s what I am trying to accomplish:

DisplayTickets.asp has a list of info which has a little bit of info about
however many tickets met the search criteria. If the user wanted all tickets
assigned to Bob which are from Customer A and were opened between March 1
and April first, the results will show, one ticket per line, on
DisplayTickets.asp. However, that page will have much more to its URL than
just DisplayTickets.asp. It will have all the stuff I just described that
was used to narrow down the search.

In each row, the Ticket number is a hyperlink to the page called
DisplayFullTickets.asp, which uses the GET method, so it will look like
this:
DisplayFullTickets.asp?TicketID=1000

Because of some other specifications in the app, I have to use the GET
method here. Otherwise, I could solve my problem very easily with hidden
fields.

Now here''s deal: the boss wants me to make it so that when he clicks a
ticket number in the list on DisplayTickets.asp, when he clicks BACK to that
page later, from DisplayFullTickets.asp, he wants the most recent ticket
number to be red, or in some other way acknowledge and display which was the
last ticket he looked at, so he can go on to the next one.

推荐答案

ThePage = Request.ServerVariables(" HTTP_REFERER")

Response.Write ThePage
< br $>
-


问候


Steven Burn

Ur IT Mate Group
www.it-mate.co.uk


保持免费!

" middletree" < MI ******** @ htomail.com>在消息中写道

新闻:#Z ************** @ TK2MSFTNGP11.phx.gbl ...
ThePage = Request.ServerVariables("HTTP_REFERER")
Response.Write ThePage

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
"middletree" <mi********@htomail.com> wrote in message
news:#Z**************@TK2MSFTNGP11.phx.gbl...
我需要捕获上一页的网址。我以为我可以找到一种方法来使用客户端代码来实现它,但我一直无法找到一种方法来实现这一点,所以也许有一个ASP解决方案。

请注意,这是一个Intranet应用程序,因此用户将从另一个页面进入特定页面。具体来说,我需要包含
GET数据的URL,该数据来自.asp之后。部分。

任何可以提供帮助的代码都是受欢迎的。在这种情况下,IE特定的是好的。

这就是我想要实现的目标:

DisplayTickets.asp有一个信息列表,其中包含一些信息。有关
的信息,但许多门票符合搜索条件。如果用户想要分配给Bob的所有
门票,这些门票来自客户A并且在3月1日到4月1日之间打开,结果将显示,每行一张票,显示在DisplayTickets.asp上。但是,该页面的URL将比仅仅DisplayTickets.asp更多。它将包含我刚刚描述的所有内容,用于缩小搜索范围。

在每一行中,票号是指向名为
DisplayFullTickets的页面的超链接。 asp,它使用GET方法,所以它看起来像
这个:
DisplayFullTickets.asp?TicketID = 1000

由于应用程序中的其他一些规范,我必须在这里使用GET
方法。否则,我可以通过隐藏的
字段轻松解决我的问题。

现在这里的交易:老板要我这么做,以便当他点击
票时DisplayTickets.asp列表中的数字,当他稍后点击BACK到
后,从DisplayFullTickets.asp,他希望最近的票证号码为红色,或以其他方式确认和显示这是他看过的最后一张票的
,所以他可以继续下一张。
I need to capture the previous page''s URL. I thought I could find a way to
do it with client-side code, but I have been unable to find a way to do
that, so perhaps there''s an ASP solution.

Please note that this is for an Intranet app, so users will be coming to a
particular page from another page. Specifically, I need the URL including
the GET data that comes after the ".asp" part.

Any code which can help is welcome. IE-specific is fine in this case.

Here''s what I am trying to accomplish:

DisplayTickets.asp has a list of info which has a little bit of info about
however many tickets met the search criteria. If the user wanted all tickets assigned to Bob which are from Customer A and were opened between March 1
and April first, the results will show, one ticket per line, on
DisplayTickets.asp. However, that page will have much more to its URL than
just DisplayTickets.asp. It will have all the stuff I just described that
was used to narrow down the search.

In each row, the Ticket number is a hyperlink to the page called
DisplayFullTickets.asp, which uses the GET method, so it will look like
this:
DisplayFullTickets.asp?TicketID=1000

Because of some other specifications in the app, I have to use the GET
method here. Otherwise, I could solve my problem very easily with hidden
fields.

Now here''s deal: the boss wants me to make it so that when he clicks a
ticket number in the list on DisplayTickets.asp, when he clicks BACK to that page later, from DisplayFullTickets.asp, he wants the most recent ticket
number to be red, or in some other way acknowledge and display which was the last ticket he looked at, so he can go on to the next one.



你可以使用HTTP_REFERER ,但它并不总是可靠的。
http://www.aspfaq.com/ 2169


-

Aaron Bertrand

SQL Server MVP
http://www.aspfaq.com/


middletree < MI ******** @ htomail.com>在消息中写道

新闻:#Z ************** @ TK2MSFTNGP11.phx.gbl ...
You can use HTTP_REFERER, but it is not always reliable.
http://www.aspfaq.com/2169

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"middletree" <mi********@htomail.com> wrote in message
news:#Z**************@TK2MSFTNGP11.phx.gbl...
我需要捕获上一页的网址。我以为我可以找到一种方法来使用客户端代码来实现它,但我一直无法找到一种方法来实现这一点,所以也许有一个ASP解决方案。

请注意,这是一个Intranet应用程序,因此用户将从另一个页面进入特定页面。具体来说,我需要包含
GET数据的URL,该数据来自.asp之后。部分。

任何可以提供帮助的代码都是受欢迎的。在这种情况下,IE特定的是好的。

这就是我想要实现的目标:

DisplayTickets.asp有一个信息列表,其中包含一些信息。有关
的信息,但许多门票符合搜索条件。如果用户想要分配给Bob的所有
门票,这些门票来自客户A并且在3月1日到4月1日之间打开,结果将显示,每行一张票,显示在DisplayTickets.asp上。但是,该页面的URL将比仅仅DisplayTickets.asp更多。它将包含我刚刚描述的所有内容,用于缩小搜索范围。

在每一行中,票号是指向名为
DisplayFullTickets的页面的超链接。 asp,它使用GET方法,所以它看起来像
这个:
DisplayFullTickets.asp?TicketID = 1000

由于应用程序中的其他一些规范,我必须在这里使用GET
方法。否则,我可以通过隐藏的
字段轻松解决我的问题。

现在这里的交易:老板要我这么做,以便当他点击
票时DisplayTickets.asp列表中的数字,当他稍后点击BACK到
后,从DisplayFullTickets.asp,他希望最近的票证号码为红色,或以其他方式确认和显示这是他看过的最后一张票的
,所以他可以继续下一张。
I need to capture the previous page''s URL. I thought I could find a way to
do it with client-side code, but I have been unable to find a way to do
that, so perhaps there''s an ASP solution.

Please note that this is for an Intranet app, so users will be coming to a
particular page from another page. Specifically, I need the URL including
the GET data that comes after the ".asp" part.

Any code which can help is welcome. IE-specific is fine in this case.

Here''s what I am trying to accomplish:

DisplayTickets.asp has a list of info which has a little bit of info about
however many tickets met the search criteria. If the user wanted all tickets assigned to Bob which are from Customer A and were opened between March 1
and April first, the results will show, one ticket per line, on
DisplayTickets.asp. However, that page will have much more to its URL than
just DisplayTickets.asp. It will have all the stuff I just described that
was used to narrow down the search.

In each row, the Ticket number is a hyperlink to the page called
DisplayFullTickets.asp, which uses the GET method, so it will look like
this:
DisplayFullTickets.asp?TicketID=1000

Because of some other specifications in the app, I have to use the GET
method here. Otherwise, I could solve my problem very easily with hidden
fields.

Now here''s deal: the boss wants me to make it so that when he clicks a
ticket number in the list on DisplayTickets.asp, when he clicks BACK to that page later, from DisplayFullTickets.asp, he wants the most recent ticket
number to be red, or in some other way acknowledge and display which was the last ticket he looked at, so he can go on to the next one.



Aaron:


谢谢你。我想在发布问题之前,当我去那里时,我没有插入正确的文字来提取这篇

的文章。我有一个跟进

的问题给你:


你工作清单中第二项不起作用的是点击 ''Home''或

a链接定义的URL


你定义的URL是什么意思?

" Aaron Bertrand - MVP < AA *** @ TRASHaspfaq.com>在消息中写道

news:e
Aaron:

Thanks for this. I guess I didn''t plug in the correct words to pull up this
article when I went there before posting my question. I have a follow-up
question for you:

The 2nd item in your list of things that won''t work is "A click on ''Home'' or
a Link with a defined URL"

What do you mean by defined URL?
"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:e


这篇关于获取上一页的URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆