Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Detecting which page opened current page, how? (http://www.velocityreviews.com/forums/t510021-detecting-which-page-opened-current-page-how.html)

Jeff 05-28-2007 07:01 AM

Detecting which page opened current page, how?
 
ASP.NET 2.0

In my webproject I've created a page which contain a button. This page will
be opened from 2 pages. This button must be invisible if the page it is
placed on are opened from one of the 2 pages, When opened from the other
page then it will be visible.

So how do I know when to make this button invisible?

I've tryed to set another parameter in the URL (GET), I added this to the
URL &mode=0, which works great. But somehow I don't like it. It gives the
user the impression that he can try mode=1 (which will change the content of
the page)...

Isn't there another way of doing it by using for example the Request class.
Doesn't it contain info about what page called current page? I'm not sure
about this!...

Any suggestions?

Jeff



=?ISO-8859-1?Q?G=F6ran_Andersson?= 05-28-2007 07:19 AM

Re: Detecting which page opened current page, how?
 
Jeff wrote:
> ASP.NET 2.0
>
> In my webproject I've created a page which contain a button. This page will
> be opened from 2 pages. This button must be invisible if the page it is
> placed on are opened from one of the 2 pages, When opened from the other
> page then it will be visible.
>
> So how do I know when to make this button invisible?
>
> I've tryed to set another parameter in the URL (GET), I added this to the
> URL &mode=0, which works great. But somehow I don't like it. It gives the
> user the impression that he can try mode=1 (which will change the content of
> the page)...
>
> Isn't there another way of doing it by using for example the Request class.
> Doesn't it contain info about what page called current page? I'm not sure
> about this!...
>
> Any suggestions?
>
> Jeff
>


You could check the value in Request.UrlReferrer.

--
Göran Andersson
_____
http://www.guffa.com

Eliyahu Goldin 05-28-2007 07:30 AM

Re: Detecting which page opened current page, how?
 
If the 2 pages are also on you site, Request.UrlReferrer will point to them.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


"Jeff" <it_consultant1@hotmail.com.NOSPAM> wrote in message
news:%23u7vUYPoHHA.2596@TK2MSFTNGP06.phx.gbl...
> ASP.NET 2.0
>
> In my webproject I've created a page which contain a button. This page
> will be opened from 2 pages. This button must be invisible if the page it
> is placed on are opened from one of the 2 pages, When opened from the
> other page then it will be visible.
>
> So how do I know when to make this button invisible?
>
> I've tryed to set another parameter in the URL (GET), I added this to the
> URL &mode=0, which works great. But somehow I don't like it. It gives the
> user the impression that he can try mode=1 (which will change the content
> of the page)...
>
> Isn't there another way of doing it by using for example the Request
> class. Doesn't it contain info about what page called current page? I'm
> not sure about this!...
>
> Any suggestions?
>
> Jeff
>





All times are GMT. The time now is 04:13 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.