Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > directly typing url in address bar

Reply
Thread Tools

directly typing url in address bar

 
 
vips
Guest
Posts: n/a
 
      03-31-2005
how can we identify whether the web page is opened by typing the link in the
address bar or it opened by clicking it from one of the previous pages ??

Is there any way to find this out .....I want the page to open only if it
come from the previous page and not by directly typing the url of my webpage
!!

vips


 
Reply With Quote
 
 
 
 
Nick Goloborodko
Guest
Posts: n/a
 
      03-31-2005
vips wrote:
> how can we identify whether the web page is opened by typing the link in the
> address bar or it opened by clicking it from one of the previous pages ??
>
> Is there any way to find this out .....I want the page to open only if it
> come from the previous page and not by directly typing the url of my webpage
> !!
>
> vips
>
>


Hi,

Basically i'm poking in the dark here, but i guess what you want here is
to use Request.Headers["Referrer"] (note: since i have not done this
before you would have to figure out the exact implementation details
your self). If the Request.Headers["Referrer"] is empty (possibly null)
then the page has been access directly, else the page has been referred
to from another website (you will get the URL value of the referring page)

Hope this helps,

Nick Goloborodko
http://nickgoloborodko.com
 
Reply With Quote
 
 
 
 
Prodip Saha
Guest
Posts: n/a
 
      03-31-2005
How about -Context.Handler.ToString()

Compare this with the current page like ASP.WebForm_aspx or
_ASP.WebForm_aspx.

Thanks,
Prodip
www.aspnet4you.com

"vips" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> how can we identify whether the web page is opened by typing the link in

the
> address bar or it opened by clicking it from one of the previous pages ??
>
> Is there any way to find this out .....I want the page to open only if it
> come from the previous page and not by directly typing the url of my

webpage
> !!
>
> vips
>
>



 
Reply With Quote
 
Matt Berther
Guest
Posts: n/a
 
      03-31-2005
Hello vips,

A somewhat reliable way is to check for Request.UrlReferrer. Some servers
and firewalls strip this out, so be aware of that.

--
Matt Berther
http://www.mattberther.com

> how can we identify whether the web page is opened by typing the link
> in the address bar or it opened by clicking it from one of the
> previous pages ??
>
> Is there any way to find this out .....I want the page to open only if
> it come from the previous page and not by directly typing the url of
> my webpage !!
>
> vips
>



 
Reply With Quote
 
darrel
Guest
Posts: n/a
 
      03-31-2005
> If the Request.Headers["Referrer"] is empty (possibly null)
> then the page has been access directly, else the page has been referred
> to from another website (you will get the URL value of the referring page)


This can also be null if the end-user is using some software on their
machine that blocks this information...such as NAV, I believe.

There probably isn't a sure-fire way to do this.

-Darrel


 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Restrict user to directly call an excel file by typing URL in browser address jonesy Java 0 10-26-2006 07:03 AM
Question about typing a URL in the address bar... RalGrl Computer Support 17 03-15-2006 02:58 PM
Re: disable title bar, status bar, and address bar of a browser window John Hann ASP .Net 0 08-21-2004 05:07 AM
disable title bar, status bar, and address bar of a browser window Matt ASP .Net 0 08-21-2004 03:50 AM
How do I prevent users from viewing a webpage directly by typing in its URL? swbaz ASP .Net 2 08-13-2003 01:23 PM



Advertisments