在asp.net 1.1中,要做1个弹出的对话框的话,一般是在服务端的代码中这样写:

btnClick.Attributes.Add("onclick", "return confirm('Are you sure?');");

现在在ASP.NET 2.0中,只要使用客户端的代码就可以拉,新多了个onclientclick,这样写
<asp:button id="btnClick" runat="server" OnClientClick="return confirm('Are you sure?');" text="Button"></asp:button>

相关文章:

  • 2021-07-14
  • 2022-01-18
  • 2022-02-28
  • 2022-01-04
  • 2022-02-26
  • 2021-06-14
猜你喜欢
  • 2022-02-03
  • 2022-12-23
  • 2021-07-25
  • 2022-12-23
相关资源
相似解决方案