PC Review


Reply
Thread Tools Rate Thread

Detecting which page opened current page, how?

 
 
Jeff
Guest
Posts: n/a
 
      28th May 2007
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


 
Reply With Quote
 
 
 
 
=?ISO-8859-1?Q?G=F6ran_Andersson?=
Guest
Posts: n/a
 
      28th May 2007
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
 
Reply With Quote
 
Eliyahu Goldin
Guest
Posts: n/a
 
      28th May 2007
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" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Refreshing parent page from a child page opened as a modal dialog box Bali Microsoft ASP .NET 1 1st Nov 2008 08:34 PM
Refreshing parent page from a child page opened as a modal dialog boxOptions Bali Microsoft ASP .NET 0 31st Oct 2008 09:57 PM
Welcome page doesn't play short video when page opened =?Utf-8?B?TWlrZSBD?= Microsoft Frontpage 5 26th Mar 2007 07:20 PM
Detecting Page Refresh from a child page ratnakarp@gmail.com Microsoft ASP .NET 0 7th Sep 2005 05:44 AM
Page load of the parent page called twice when a modal dialog is opened from a button click of the user control on the parent page Samy Microsoft ASP .NET 2 15th Aug 2005 04:30 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:49 AM.