hello
please i nead help with response.redirect to an absolute path,i tried everything i can but with no result so for example:
Response.Redirect("file:\\C:\Users\Toshiba\Desktop\4.jpg")
so ctrl and click in "file:\\C:\Users\Toshiba\Desktop\4.jpg" it display the image in visuel studio but it doesn't work in the browser.
so thank you for help.

Recommended Answers

All 8 Replies

ok i used response.writefile and it works but for aspx page it doesn't because it's not a file so back to response.redirect and again i tried everything i can with no result.
thanks again.

thank you for your answer but just i need to how write the path in response.redirect,and the path it's an absolute path not relative.

hmm.....it's not gonna happen if u r using redirect method!

is there another method to open another aspx page ?

hello
please i nead help with response.redirect to an absolute path,i tried everything i can but with no result so for example:
Response.Redirect("file:\\C:\Users\Toshiba\Desktop\4.jpg")
so ctrl and click in "file:\\C:\Users\Toshiba\Desktop\4.jpg" it display the image in visuel studio but it doesn't work in the browser.
so thank you for help.

image should be under website folder. then use server.mappath("virtual path").

the redirect method would serve you

response.redirect is used for redirecting the file that resides in web application.
to redirect focus on client's local file , u have to find the file location , by find file through server.mappath.then redirect it through response.redirect.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.