473,407 Members | 2,320 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,407 software developers and data experts.

UrlReferrer null, button click

Hi, all -

On Page1.aspx I have a button control that, when clicked,
Response.Redirect("Page3.aspx"). On Page2.aspx I have a hyperlink to
Page3.aspx.

On Page3.aspx, I want to know which page the user came from. I tried
UrlReferrer, but this only registers Page2.aspx (the hyperlink page). If the
user comes from Page1.aspx (the button page), UrlReferrer is null.

What's the best way to solve this? Should I pass the previous page as a
QueryString? Thanks in advance!

- John
Nov 18 '05 #1
1 1761
hi

please check this

if (urlReferer.IndexOf("page1", 1, urlReferer.Length - 1) > 0)

{ViewState["PAGEURL"] = "page1

double d1;

if (Request.QueryString["sometId"] == null ||
double.TryParse(Request.QueryString["sometId"],
System.Globalization.NumberStyles.Any, null,out d1) == false)

{return false;}

}
"John" <jc*****************@hotmail.com> wrote in message
news:J4*****************@news-server.bigpond.net.au...
Hi, all -

On Page1.aspx I have a button control that, when clicked,
Response.Redirect("Page3.aspx"). On Page2.aspx I have a hyperlink to
Page3.aspx.

On Page3.aspx, I want to know which page the user came from. I tried
UrlReferrer, but this only registers Page2.aspx (the hyperlink page). If the user comes from Page1.aspx (the button page), UrlReferrer is null.

What's the best way to solve this? Should I pass the previous page as a
QueryString? Thanks in advance!

- John

Nov 18 '05 #2

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

Similar topics

0
by: Jiong Feng | last post by:
Hi, Here is my problem: I created a try.htm on my server, which contains a link to the default.aspx page. if I use http://localhost/try.htm, and click the link, then in default.aspx, I could...
4
by: Harley | last post by:
i have found a problem when using Request.UrlReferrer. if i call the page using a javascript function, the referrer is null... i need to call a page and open it on a specific browser size, with no...
7
by: Ivan Demkovitch | last post by:
Hi! Here is what I'm doing: I have Login.aspx with code to do forms authentification and I have this line at the end: Response.Redirect(Request.UrlReferrer.ToString()); I have other...
3
by: Oney | last post by:
I created two iss folder under my aspx project and I redirected each one of them to same aspx page by IIS that is test.aspx. on the page load of test.aspx I have to catch where the request come in!...
7
by: Aaron Prohaska | last post by:
Has anyone had any experience with Nortan Antivirus causing problems when trying to use Request.UrlReferrer? I am seeing in the Nortan Antivirus log that its blocking my page from loading because...
6
by: saden_paki | last post by:
I am having this problem, that Request.UrlReferrer comes out to be Nothing, when a user hits a button on a html page which only have this button, on this button's onClick javascript event I have...
4
by: Logician | last post by:
Objective To get linking domain on an affiliate program, ie linking site--->my site-->write cookie-->track visitor-->report to affiliate Current from linking site...
2
by: ad | last post by:
I have tree web page A.ASPX, B.ASPX and CheckPW.aspx There is a button in A.ASPX, the click of that button is redirect to B.ASPX .. I write a Page_Load event in b.aspx, if the Session is null...
2
by: deepak.bhardwaj | last post by:
Hi, I have implemented the IHttpHandler interface for generating images and writing them to response stream in binary format. I use an IHttpHandlerFactory to instantiate that handler. A .aspx...
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: 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
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...
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.