473,378 Members | 1,462 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

directly typing url in address bar

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
Nov 19 '05 #1
4 2279
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
Nov 19 '05 #2
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" <yp**@hotmail.com> wrote in message
news:OM**************@tk2msftngp13.phx.gbl...
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

Nov 19 '05 #3
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

Nov 19 '05 #4
> 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
Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

53
by: dterrors | last post by:
Will php 6 do strong typing and/or namespaces? I was shocked to find out today that there are some people who actually argue that weak typing is somehow better. I didn't even know there was a...
12
by: Michael Muller | last post by:
Is there currently any plan to introduce static typing in any future version of Python? (I'm not entirely sure that "static typing" is the right term: what I'm talking about is the declaration of...
12
by: Jason Tesser | last post by:
I work for at a college where I am one of 2 full-time developers and we are looking to program a new software package fro the campus. This is a huge project as it will include everything from...
94
by: Gabriel Zachmann | last post by:
Is it correct to say that strong/weak typing does not make a difference if one does not use any pointers (or adress-taking operator)? More concretely, I am thinking particularly of Python vs C++....
9
by: Gerald Lightsey | last post by:
I am doing some work that involves automating MS MapPoint 2002. The object model is documented in the context of Visual Basic 6.0. A typical example follows. 'Output first result of find...
2
by: swbaz | last post by:
What is an effect way to prevent users from viewing a webpage directly by typing in its URL? For example: If a default page is set up as a login screen with user name and password. The user...
5
by: Tim Walters | last post by:
My web page was put together by the Spanish yellow pages company (closely associated with -- but don't ask me how -- with the ISP Telefonica). I can access the page by going to the yellow pages...
0
by: plzhelpme1 | last post by:
how can i handle dynamic values in grid(ASP.Net and C# )??same like shop billing system..(User typing values in grid ..need to get result in grid itself) i need to calculate column1(No of...
4
by: Luqman | last post by:
How can I Prevent user from accessing any page directly without Login ? User should not be able to by pass the Login screen by typing the Url of any page directly. I am using ASP.Net 2.0 with...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.