gregalhaig1
asked on
View State Causing DataList to disappear
We have a ArrayList that we bind to a DataList, then we create a viewstate that contains the ArrayList. The final line in the code,
ViewState["ParamArray"] = alParams;
is causing the DataList to disappear when we debug. If I comment out the above line, the DataList appears. Any help is appreciated.
PS - I am kind of new to ASP.NET, so let me apologize if my phrasing or anything is incorrect.
ViewState["ParamArray"] = alParams;
is causing the DataList to disappear when we debug. If I comment out the above line, the DataList appears. Any help is appreciated.
PS - I am kind of new to ASP.NET, so let me apologize if my phrasing or anything is incorrect.
//dlParams is a DataList
ArrayList alParams= new ArrayList();
foreach (string s in _xmlParams)
{
ReportParameters reportParameters = new ReportParameters();
etc, etc, etc, etc
reportParameters.ID = newID;
reportParameters.Caption = newTitle;
reportParameters.DefaultValue = defval;
alParams.Add(reportParameters);
dlParams.DataSource = alParams;
dlParams.DataBind();
ViewState["ParamArray"] = alParams;
}
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER