473,385 Members | 1,279 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,385 software developers and data experts.

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
May 28 '07 #1
2 1230
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
May 28 '07 #2
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************@hotmail.com.NOSPAMwrote in message
news:%2****************@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

May 28 '07 #3

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

Similar topics

7
by: indie | last post by:
how to make a user management in php, i mean that i want to limit the user access to my page. the script will not allow 2 user have an access to my page at the same time. the script only allow 1...
10
by: Frances Del Rio | last post by:
pls, why is this not working? <SCRIPT language=JavaScript type="text/javascript"> var br = '<SCRIPT language=Javascript' br += 'src="js_pop.js" type="text/javascript">' br += '</SCRIPT>' var...
4
by: Hal | last post by:
Can someone please tell me what is wrong with this script? <script language="JavaScript"> <!-- function HF_CloseAllChildren() { if (g_win1) != undefined { if ((g_win1) && !(g_win1.closed))...
2
by: Sam-Kiwi | last post by:
I've spent the last 6 months developing a pay-per-download website using ASP.NET Users purchase documents and then download them. The intention is that users are only charged for documents...
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
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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: 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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.