ASP.NET/HTML: HTML button's onClick property inside ASP.NET (.cs)

前端 未结 5 1731

I just wanna find out if there\'s a way to put my onClick event inside .cs:

5条回答
  •  不知归路
    2020-12-14 08:47

    You'll want to use the onServerClick. There's an example of how to do that on MSDN:

    
    
    
    protected void Button1_OnClick(object Source, EventArgs e) {
        // secret codes go here
    }
    

提交回复
热议问题