I am getting ‘Resource cannot be found’ error with the following URL Response.Redirect. If I use Response.Redirect(“~/Orders/ViewOrders.aspx”), it works fine. What could be wrong? Thanks for any suggestions.
Here is the output of the URL string.
~/Orders/ViewOrders.aspx?url=’http://servername/Reports/Pages/ReportViewer.aspx?/test/test_orders&rs:Command=Render’
Here is my code.
string url = string.Format(“~/Orders/ViewOrders.aspx?url='{0}'”, editItem.Cells[14].Text);
Response.Redirect(url);
You need to encode the querystring
Also, I do not think you should have those single quotes. I removed them.