txtDeliveryOrder.Text = txtCarNo.Text = txtDeliveryDate.Text = txtAffirmSite.Text = txtMatDes.Text = txtRefrence.Text = txtSuttle.Text = string.Empty;
还不如用循环来清空所有文本框, 即使有新添加的文本框, 也不需要改代码。 foreach(Control c in xxx.FindControls) { TextBox tb = c As TextBox; if(tb!=null) tb.Text = string.Empty; }
[quote=引用 1 楼 caozhy 的回复:] 这么写没有任何问题。
这么写没有任何问题。
111,093
社区成员
642,554
社区内容
加载中
让您成为最强悍的C#开发者
试试用AI创作助手写篇文章吧