Hi All,
I have a user control that i wish to persist the business object in that it uses.
So I tried to persist it in the viewstate.
I get an error when doing this.
Is there any reason why AJAX wont allow the use fo view state.
This persistance work if I use the Session Object, but I dont want to store everything in the session object if I can avoid it.
Code:
public CompanyDefn Company
{
get
{
return (CompanyDefn)ViewState["Company"];
}
set
{
if (ViewState["Company"] == null) { ViewState.Add("Company", value); }
else { ViewState["Company"] = value; }
setControl();
}
}
The error is:
Quote:
quote:Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorExceptio n: Post Back Error!
|
Any advise would be appreciated
======================================
"They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad."
--Shakespeare
======================================