近日在用ASP。NET开发一个系统,做到修改用户个人资料时出现如下错误:
指定的参数已超出有效值的范围。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
异常详细信息: System.ArgumentOutOfRangeException: 指定的参数已超出有效值的范围。
源错误:
行 46: Address.Text = userInfo.address;
行 47: ZipCode.Text = userInfo.zipcode;
行 48: Sex.SelectedValue = userInfo.sex;
行 49: Email.Text = userInfo.email;
行 50:
源文件: f:\eshop\editacount.aspx.cs 行: 48
堆栈跟踪:
[ArgumentOutOfRangeException: 指定的参数已超出有效值的范围。]
System.Web.UI.WebControls.ListControl.set_SelectedValue(String value) +151
eshop.EditAcount.GetUserInfo() in f:\eshop\editacount.aspx.cs:48
eshop.EditAcount.Page_Load(Object sender, EventArgs e) in f:\eshop\editacount.aspx.cs:35
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
版本信息: Microsoft .NET Framework 版本:1.1.4322.573; ASP.NET 版本:1.1.4322.573 <--
at System.Web.UI.WebControls.ListControl.set_SelectedValue(String value)
at eshop.EditAcount.GetUserInfo() in f:\eshop\editacount.aspx.cs:line 48
at eshop.EditAcount.Page_Load(Object sender, EventArgs e) in f:\eshop\editacount.aspx.cs:line 35
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain()
[HttpUnhandledException]: 发生类型为 System.Web.HttpUnhandledException 的异常。
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain()
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
-->
请各位大虾指点一二!