must be marked as Serializable or have a TypeConverter other than ReferenceConverter

Joined
Dec 22, 2005
Messages
1
Reaction score
0
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

 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top