给他们一个一个的label.clear()
解决方案 »
- C/S 连接网络设置
- dateTimePicker能不能只显示年和月,不显示日呢?
- Datagridview中加入CheckBox控件可以吗?
- 关于一端用VS2005C#,一端用VB6.0作的网络通信的问题!
- DBHelper类 有什么好处 有存在的必要性吗?
- C#,asp.net视频教程大家来家速!!!!
- 一个算法的问题。高分拜求!在线等,有正确答案就揭帖!
- 高分求购:怎样写一个简单的函数,把画面上很多个datagrid中textbox的ReadOnly 弄成 true
- 如何把客户端的Excel文件保存到数据库中?急急!(在线等)
- localDB数据库连接问题
- 如何向SQL数据库中写入时间?
- 请问:构造函数中订阅事件有什么用!!!!!
foreach(Control c in this.Controls)
{
if(c.gettype() == System.Windows.Forms.TextBox.gettype())
{
((TextBox)c).Text ="";
}
}
foreach(Control c in this.Controls)
{
if(c.gettype() == System.Web.UI.WebControls.Label.gettype())
{
((Label)c).Text ="";
}
}
foreach (System.Web.UI.Control Ctl in this.Controls)
{
if(Ctl.GetType()==System.Type.GetType("System.Web.UI.WebControls.Label"))
{
Ctl.Text="";
}
}
foreach (System.Web.UI.WebControls.Label Lbl in this.Controls)
{
Lbl.Text="";
}
{
if ( objSourceCtrl.GetType().ToString() == "System.Windows.Forms.Label" )
{
label1.Clear();
}
}测试OK.
__>(Label)objSourceCtrl.Clear();改一句话