UrlReferrer null, button click

J

John

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
 
K

Karunakararao

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;}

}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,222
Members
46,810
Latest member
Kassie0918

Latest Threads

Top