Hi i'm getting the following error below and my dumb question is, how do i know what line caused the error?
my guess is that its the code below, any suggestions?, thanks:
string[] items = dbstr.Split(new Char[] { '|' }, 3);
cmd.Dispose();
Session["Gender"] = items[0].Trim();
Session["PersonID"] = items[1].Trim();
Session["EMRID"] = items[2].Trim();
Code:
Collection is read-only.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NotSupportedException: Collection is read-only.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[NotSupportedException: Collection is read-only.]
System.Collections.Specialized.NameValueCollection.Clear() +1830662
WebApplication1.member_area.__inWin_.securitySection1(String strPass, String strQuestion, String strAnswer) in C:\Inetpub\[URL unfurl="true"]wwwroot\WebApplication1\member-area\userControls\windowfiles\__inWin_.aspx.cs:339[/URL]
WebApplication1.member_area.__inWin_.NewCredentials(String strPass, String strQuestion, String strAnswer) in C:\Inetpub\[URL unfurl="true"]wwwroot\WebApplication1\member-area\userControls\windowfiles\__inWin_.aspx.cs:328[/URL]
WebApplication1.member_area.__inWin_.Page_Load(Object sender, EventArgs e) in C:\Inetpub\[URL unfurl="true"]wwwroot\WebApplication1\member-area\userControls\windowfiles\__inWin_.aspx.cs:103[/URL]
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061
my guess is that its the code below, any suggestions?, thanks:
string[] items = dbstr.Split(new Char[] { '|' }, 3);
cmd.Dispose();
Session["Gender"] = items[0].Trim();
Session["PersonID"] = items[1].Trim();
Session["EMRID"] = items[2].Trim();