Need help with Response.Redirect

A

AboutJAV

HI,

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?

Thanks
 
M

Mark Rae [MVP]

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

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

Top