JackW9653
asked on
Response.Redirect Syntax in ASP.NET
Hello Experts,
I'm having an issue with the syntax for the Response.Redirect command. I combined all the projects into 1 solution thinking this would be easier to use Session variables with and make the Response.Redirect more straightforward.
I'm initially launching the app from IPED_Hospice_Test.Login.as px (http://localhost:57848/Login.aspx) and once validation occurs going to IPED_Reporting.ReportSelec tor.aspx (http://localhost:57848/IPED_Reporting/ReportSelector.aspx). I'm using Response.Redirect("~/IPED_ Reporting/ ReportSele ctor.aspx" , False) . I use the tilde because the pages are in different folders (as seen in the Solution Explorer screenshot).
In VS I've set to use the Development Server with port 57848, I've tried IIS and IIS Express. Any help will be appreciated.
Thank you,
Jack W
I'm having an issue with the syntax for the Response.Redirect command. I combined all the projects into 1 solution thinking this would be easier to use Session variables with and make the Response.Redirect more straightforward.
I'm initially launching the app from IPED_Hospice_Test.Login.as
In VS I've set to use the Development Server with port 57848, I've tried IIS and IIS Express. Any help will be appreciated.
Thank you,
Jack W
ASKER
Thanks Bob. Yes it's a 404 - Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /IPED_Reporting/ReportSele ctor.aspx
i'll check out the Page Trace link and IPED_Reporting is not at the root of the website but a folder.
Jack
Requested URL: /IPED_Reporting/ReportSele
i'll check out the Page Trace link and IPED_Reporting is not at the root of the website but a folder.
Jack
ASKER
Bob, The Trace Link only fired for the Login page and it had the Session variables i was expecting but when it hit the Response.Redirect line I got the 404 again. I changed that line to Response.Redirect("/IPED_R eporting/R eportSelec tor.aspx") and Response.Redirect("IPED_Re porting/Re portSelect or.aspx") but got the 404 on both.
Any other ideas?
Jack
Any other ideas?
Jack
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Bob,
I tried the new target but I'm getting a different error, ' Cannot use a leading .. to exit above the top directory.' You know it's just sad when a different error is progress. Thanks for sticking with this.
Jack
I tried the new target but I'm getting a different error, ' Cannot use a leading .. to exit above the top directory.' You know it's just sad when a different error is progress. Thanks for sticking with this.
Jack
Based on the pic above, what URL are you using to get to the point where the error occurs?
ASKER
Hi Bob,
Thank you for following up on this. I wound up just combining the 2 projects and eliminated the problem. Now I'm using: Response.Redirect("~/Repor tSelector. aspx", False), and this allows the Session ID to stay the same. The problem before was different Session variables.
Thanks again,
JackW9653
Thank you for following up on this. I wound up just combining the 2 projects and eliminated the problem. Now I'm using: Response.Redirect("~/Repor
Thanks again,
JackW9653
ASKER
Very thorough.
ahhhh, that wouldn't have been where I woulda thought. Good to know what fixed it for future.
If not mistaken, the ~/ points you to the root of the website. If that root is IPED_Reporting, then your entry of "~/IPED_Reporting/ReportSe
I hope my thinking is right.
You might be able to use a Page TRACE, which would appear on your browser, it may help. Instructions are at
http://msdn.microsoft.com/en-us/library/vstudio/94c55d08(v=vs.100).aspx
Bob