如何在动态创建的c#.net中检查文本框是否为空 [英] how to check text box empty or not in c#.net which is dynamically created
本文介绍了如何在动态创建的c#.net中检查文本框是否为空的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我添加了三个具有相同top属性的文本框.当我单击保存按钮时,如何检查此文本框是否为空.如何将其值插入Windows窗体application
i have added three textbox which have the same top property . how to check this text boxes are empty or not when i click on save button. how to insert it''s value is database in windows form application
推荐答案
1中的数据库. 如何检查文本框是否为空? [ ^ ]
2. ^ ]
3. 从文本框插入sql数据库时点击按钮 [ ^ ]
1. how to check whether a text box is empty ?[^]
2. save-multiple-dynamic-textbox-values-to-sql-database-windows-forms-csharp[^]
3. Insert into sql database from a textbox when a button is clicked[^]
protected override void LoadViewState(object savedState)
{
base.LoadViewState(savedState);
foreach (string txtID in ControlsList)
{
TextBox SerialText = new TextBox();
SerialText.ID = txtID;
panelEnterSerial.Controls.Add(SerialText);
panelEnterSerial.Controls.Add(new LiteralControl(" "));
}
}
这篇关于如何在动态创建的c#.net中检查文本框是否为空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文