asp.net让结果显示在已有控件里
因为控件很多 不想一个一个的输入 但是用循环 提示
因为控件很多 不想一个一个的输入 但是用循环 提示
答案:遍历控件,找出TEXTBOX类型
例如:
foreach (Control cur in Controls)
{
if (cur is TextBox && cur.Text == string.Empty)
{
cur.Text = "0";
}
}
上一个:Microsoft VBScript 编译器错误 '800a03f6' 缺少 'End' \QQ.asp, line 4
下一个:ASP网站现在还有优势没 ?听说现在很牛的网站是用php语言写的