If I have a button on my ASP.NET page which will take you to another page but that page will do something and then will send user back using
Uri uu= Request.UrlReferrer;
if (uu!= null)
Response.Redirect(uu.ToString());
Now Which page event can I use so that when other pages displays I can display a message box.
In short I am running my custom code in a “aspx” page where user is directed on button click, and then after custom code I am sending user back to old page, but it happens so quickly that user doesn’t realize that he went on another page, now I want to display a message box after redirect on same page user started from, what to do :S !
EDIT
Sorry guys but I can’t make changes to ASP page where button is at all
🙁
I’m a bit unsure about how the
Request.UrlReferrergets set. I think it’s a browser implementation detail. So I wouldn’t trust on that.I would go for something like
And check if message=1 is set.
But if you want to use the
Request.UrlReferrerit should be accessible onPage_Load