【问题标题】:ShowStandardCancelButton takes me to homepage insted of previous page显示标准取消按钮将我带到主页而不是上一页
【发布时间】:2011-10-11 11:22:36
【问题描述】:

正如主题所提到的,我想创建一个取消按钮,将我带到上一页。我正在使用标准的取消按钮。我想要一个取消按钮,它只会让我后退一步,回到我的上一页。

<wssuc:ButtonSection runat="server" ShowStandardCancelButton="true">

【问题讨论】:

    标签: asp.net button cancel-button


    【解决方案1】:

    您可以使用 javascript 轻松完成此操作,无需服务器控制。没有回发;)

     window.history.back();
    

    但是如果你坚持使用服务器控制...

    <asp:Button runat="server" OnClientClik="javascript:window.history.back();" Text="Cancel" Visible="True" />
    

    【讨论】:

    • 找到了答案。和你的类似。无论如何谢谢:
    猜你喜欢
    • 2019-08-30
    • 2011-10-16
    • 2017-11-23
    • 1970-01-01
    • 2014-08-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多