Response.Redirect("~/Payment.aspx");
Asp.net Response.Redirect
-
16-06-2023 - |
Pregunta
My project's start page is Default.aspx.
protected void ImageButton1_Click1(object sender, ImageClickEventArgs e)
{
Response.Redirect("Payment.aspx);
}
When I click the button it returns //localhost/Default.aspx/Payment.aspx instead of //localhost/Payment.aspx. Where is the problem?
Solución
Otros consejos
Try this.
Response.Redirect("~/Payment.aspx");
The tilde (~) character represents the root directory of the application in ASP.NET.
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow