将一个input:button控件放入页面,不知道如何加click事件,新手刚接触,谢谢

解决方案 »

  1.   

    工具箱打开直接双击或者拖到你设计页面来,然后双击input:button就有click事件了。
      

  2.   

    onclick="";可以通过js编写事件代码,也可以在后台编写
      

  3.   

    双击控件或在Script里写一个Function方法放Onclick=“方法名”
      

  4.   

    input:button控件里面有个onserverclick事件,你可以在后台写个方法
      

  5.   

    html控件HtmlInputButton只能给它添加js的click事件,不能直接添加服务器端的事件。注意它和web控件Button有所不同。
      

  6.   

    <input type="button" runat="server" onserverclick="Test" />protected void Test(object sender,EventArgs e)
    {
       
    }