문제

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?

도움이 되었습니까?

해결책

Response.Redirect("~/Payment.aspx");

다른 팁

Try this.

Response.Redirect("~/Payment.aspx");

The tilde (~) character represents the root directory of the application in ASP.NET.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top