Saturday, March 31, 2012

Trim URL

Hi,
I am involved in designing a website in which on a certain page(that contains a form) if some message is to be shown to the user the URL looks like
http://myserver/somepage.aspx?message=.....
Now if on that page the user requests re-submits the form I want the URL to be trimmed as simply http://myserver/somepage.aspx

Also is there some way that I can send such error messages through some means(like POST) such that there is no change in the url.If yes plz elaborate on it

Cheers,
-Aayush

Why don't you pass the parameter into a session, so instead of passing ?message=.....

do

Session["message"] = "...";

and in the next page you do:

string message = Session["message"].ToString();

Session.Remove("message");


you can use server variables and retrieve the required info

0 comments:

Post a Comment