1、前台代码:创建一个asp:TextBox控件和一个asp:Button按钮,隐藏掉按钮;
2、后台代码:绑定TextBox回车事件;
public partial class _Default : Page
{
protected void Page_Load(object sender, EventArgs e)
{
txt_value.Attributes.Add("onkeypress", "btn_btn");
}
protected void btn_btn_Click(object sender, EventArgs e)
{
}
}



