按钮的OnClick不开火ASP.NET中的第一次点击? [英] Button OnClick not firing on first click in ASP.NET?
本文介绍了按钮的OnClick不开火ASP.NET中的第一次点击?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
protected void ButtonCancel_Click(object sender, EventArgs e)
{
Response.Redirect("~/Logon.aspx");
}
这是不工作时,首先点击取消按钮?
this is not working when first click on cancel button?
推荐答案
您确定的标记是正确的?
Are you sure the markup is correct?
它看起来类似于下面的?
Does it look similar to the following?
<asp:Button ID="ButtonCancel" OnClick="ButtonCancel_Click" />
您需要的onclick事件属性为它工作。
You need the "OnClick" attribute for it to work.
这篇关于按钮的OnClick不开火ASP.NET中的第一次点击?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文