下面代码在VS2012中调试出错;C# Web窗体界面
usingSystem;usingSystem.Collections.Generic;usingSystem.Configuration;usingSystem.Dat...
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
………………
string tetBoxName;
for (int n = 0; n < 40; n++)
{
tetBoxName = "TxtPassword"+n;
Control txtboxPWD = (Control)this.Page.FindControl(tetBoxName);
if (!DataValid.IsNullOrInt((txtboxPWD as TextBox).Text))
throw new CustomException("“密码”不是一个有效的整数,请您重新输入。");
intPWD[n] = (txtboxPWD as TextBox).Text.ToString();
}
txtpassword0的文本控件是存在的但还是会出错,,
请高手指教。。谢谢 展开
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
………………
string tetBoxName;
for (int n = 0; n < 40; n++)
{
tetBoxName = "TxtPassword"+n;
Control txtboxPWD = (Control)this.Page.FindControl(tetBoxName);
if (!DataValid.IsNullOrInt((txtboxPWD as TextBox).Text))
throw new CustomException("“密码”不是一个有效的整数,请您重新输入。");
intPWD[n] = (txtboxPWD as TextBox).Text.ToString();
}
txtpassword0的文本控件是存在的但还是会出错,,
请高手指教。。谢谢 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询