Re: Need help with Response.Redirect



<AboutJAV@xxxxxxxxx> wrote in message news:ac4fc0da-987b-413d-8ff4-2fc101a3363e@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

On my development pc, I am using this following line when the user
click on the button from my webpage

Response.Redirect(Request.ApplicationPath + "/Search.aspx?
Search=" + "B");

The Request.ApplicationPath contains the name of my application
folder.

However, when I ftp all the files to my web hosting server folder, the
folder value is empty.

What call can I make to get the folder name to replace the
Request.ApplicationPath?

Assuming that Search.aspx is in the root of your application, you should be able to use:

Response.Redirect("~/Search.aspx?Search=B", false);


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

.