日期:2014-05-17 浏览次数:20441 次
[code=csharp] <input id="btnCreateUser" type="button" value="创建用户" class="btn btn1" onclick="return btnCreateUser_onclick()" />[/code]
[code=csharp] <input id="btnCreateUser" type="button" value="创建用户" runat="server" onserverclick="btnCreateUser_Click" class="btn btn1" onclick="return btnCreateUser_onclick()" />[/code]
<input id="btnCreateUser" name="btnCreateUser" type="button" value="创建用户" runat="server" class="btn btn1" />
//Page_Load 方法体内注册事件方法
protected void Page_Load(object sender, EventArgs e)
{
this.btnCreateUser.ServerClick += new EventHandler(btn_ServerClick);
}
//编写事件执行函数
void btn_ServerClick(object sender, EventArgs e)
{
//throw new NotImplementedException();
}
protected void btnCreateUser_Click(object sender, EventArgs e)
{
}
<form id="form1" runat="server">
<div>
<input runat="server" onserverclick="CsClick" value="点击" type="button" style="width: 40px"/>
</div>
</form>