如何在c#中为动态创建的文本框添加服务器端onblur事件 [英] How to add server side onblur event for dynamically created textbox in c#
本文介绍了如何在c#中为动态创建的文本框添加服务器端onblur事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在运行时动态创建了文本框,按钮。我需要使用服务器端方法为该文本框添加onblur事件。在c#
先谢谢
I have created textbox,button dynamically at runtime.I need to add the onblur event for that textbox using server side method..in c#
Thanks in Advance
推荐答案
....
TextBox tb = new System.Windows.Forms.TextBox();
System.Windows.Forms.KeyPressEventHandler(this.textBox10_KeyPress);
tb.Leave += new EventHandler(tb_Leave);
....
void tb_Leave(object sender, EventArgs e)
{
throw new Exception("The method or operation is not implemented.");
}
这篇关于如何在c#中为动态创建的文本框添加服务器端onblur事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文