Hi,
I have a following class.
[Serializable()]
public class UserHomePageInformation
{
public UserHomePageInformation()
{
//
// TODO: Add constructor logic here
//
}
private UserProjects.ProjectsDataTable _projects= new KMG.IssueTracker.DataModal.UserProjects.ProjectsDataTable();
private KMG.IssueTracker.DataModal.CommonCollection.CommonsDataTable _alerts=new KMG.IssueTracker.DataModal.CommonCollection.CommonsDataTable();
public UserProjects.ProjectsDataTable Projects
{
get{return(_projects);}
set{_projects=value;}
}
public KMG.IssueTracker.DataModal.CommonCollection.CommonsDataTable Alerts
{
get{return(_alerts);}
set{_alerts=value;}
}
}
When i create a object of this class and fill data in the table it works fine. But when i try to store the object of class in viewstate of aspx it gives me following error.
The type 'KMG.IssueTracker.DataModal.UserHomePageInformation' must be marked as Serializable or have a TypeConverter other than ReferenceConverter to be put in viewstate
I have tried the same thing with the typed dataset of the table it works fine. Can anyone help me in this.
KB
I have a following class.
[Serializable()]
public class UserHomePageInformation
{
public UserHomePageInformation()
{
//
// TODO: Add constructor logic here
//
}
private UserProjects.ProjectsDataTable _projects= new KMG.IssueTracker.DataModal.UserProjects.ProjectsDataTable();
private KMG.IssueTracker.DataModal.CommonCollection.CommonsDataTable _alerts=new KMG.IssueTracker.DataModal.CommonCollection.CommonsDataTable();
public UserProjects.ProjectsDataTable Projects
{
get{return(_projects);}
set{_projects=value;}
}
public KMG.IssueTracker.DataModal.CommonCollection.CommonsDataTable Alerts
{
get{return(_alerts);}
set{_alerts=value;}
}
}
When i create a object of this class and fill data in the table it works fine. But when i try to store the object of class in viewstate of aspx it gives me following error.
The type 'KMG.IssueTracker.DataModal.UserHomePageInformation' must be marked as Serializable or have a TypeConverter other than ReferenceConverter to be put in viewstate
I have tried the same thing with the typed dataset of the table it works fine. Can anyone help me in this.
KB