PagedDataSource does not support serialization - how can I enforce this ?

Posted by Darkyo on Stack Overflow See other posts from Stack Overflow or by Darkyo
Published on 2010-03-22T05:11:56Z Indexed on 2010/03/22 5:21 UTC
Read the original article Hit count: 256

Filed under:

Sounds like I want to override a physics law, but at least it is the most reasonnable solution, cpu / HDD and Ram effective for my asp.net project. In fact, I got a pageddataSource and a customDataReader that supports paginated data. The truth is my data are in a viewstate variable, because it is re-used in an update panel. When I intend to use it into my pageddatasource, asp.net 3.5 kills me with a

System.Web.UI.WebControls.PagedDataSource' in Assembly 'System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' is not marked as serializable. 

cool exception... So I'd rather not offend newton because I know he'll always win, but I would need some help to enforce this pagedDataSource law, that seems so unbelievable, except if someone has an explanation.

© Stack Overflow or respective owner

Related posts about asp.net-3.5