I am using this code...
Server.Transfer("/Student/StudentControlPanel.aspx?username=" + username);
And getting the following Exception:
InvalidOperationException : "Failed to map the path '/Student/StudentControlPanel.aspx'."
StudentControlPanel.aspx
- page is located in
App Root -> Web -> Student
But my .sln file is located in
App Root -> Solution
Default.aspx
is in
App Root -> Web
Can anyone give me a solution?
Try this:
Server.Transfer("~/Student/StudentControlPanel.aspx?username=" + username);
The tilde (~
) resolves to the root of the application.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With