Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/sharepoint/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
单击C#(Web部件)中的“取消”按钮时重定向到新页面_C# - Fatal编程技术网

单击C#(Web部件)中的“取消”按钮时重定向到新页面

单击C#(Web部件)中的“取消”按钮时重定向到新页面,c#,C#,我想做的是。当我点击取消按钮时,它会将我重定向到“Example.aspx”。 我正在使用C#调用该方法创建一个Web部件 例如: protected void btnCanel_Click(object sender, EventArgs e) { Response.Redirect("example.aspx"); } 要在服务器上准确地执行您想要的操作,将非常困难。但是没有必要回发。有几个客户端解决方案。使用LinkButton,w/onclick html属性设置为false。

我想做的是。当我点击取消按钮时,它会将我重定向到“Example.aspx”。 我正在使用C#

调用该方法创建一个Web部件

例如:

protected void btnCanel_Click(object sender, EventArgs e)
{
    Response.Redirect("example.aspx");
}

要在服务器上准确地执行您想要的操作,将非常困难。但是没有必要回发。有几个客户端解决方案。使用LinkButton,w/onclick html属性设置为false。我的建议是这样的:

Response.Redirect("Example.aspx");

Aww,你不必那么做,它毁了我的笑话!;)
Response.Redirect("Example.aspx");
<INPUT TYPE="BUTTON" VALUE="Cancel" ONCLICK="window.location.href='http://www.yourdomain.com/example.aspx'">