清空页面TextBox
时间:2011-05-06 来源:benbenfeng
public static void TextBoxSetEmpty(Page page)
{
int nPageControls = page.Controls.Count;
for (int i = 0; i < nPageControls; i++)
{
foreach (System.Web.UI.Control control in page.Controls[i].Controls)
{
if (control is TextBox)
{
((TextBox)control).Text = string.Empty;
}
}
}
}
相关阅读 更多 +