Reputation: 1
I want to give the full path for a file "Sample.xml" in ASP.NET in the following code
Response.Redirect("Sample.xml");
It does not work if I try like "C:\Users\abc\Documents\Visual Studio 2010\WebSites\WebSite1\Sample.xml"
Any suggestions please
Upvotes: 0
Views: 121
Reputation: 460
Try
Response.Redirect(ResolveUrl("~/Sample.xml"));
I am assuming Sample.xml is in the root of your website.
Upvotes: 1