Asp.net Error Serializing Value
Contents |
here for a quick overview of the site Help Center sys.webforms.pagerequestmanagerservererrorexception: error serializing value Detailed answers to any questions you might have Meta Discuss
Error Serializing Value System Collections Generic List Of Type System Collections Generic List
the workings and policies of this site About Us Learn more about Stack Overflow the
Argumentexception Error Serializing Value 'system.collections.generic.list 1
company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss
Serializable C#
Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up How to serialize a ViewState objects up vote 0 down vote favorite I have some functions that query a database and puts the result into a gridview. It also sets a ViewState variable that contains the results of the query. When I postback, I have a load function that loads the gridview from the last results if any. The Problem I am having is that I am getting an error that basically says that the viewstate object needs to be serialized. From what I have I am not sure how to do this. Error: Sys.WebForms.PageRequestManagerServerErrorException: Error serializing value 'System.Collections.Generic.List1[<>f__AnonymousType172[System.Int32,System.String]]' of type 'System.Collections.Generic.List1[[<>f__AnonymousType172[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], App_Web_rjb524gi, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]].' My code so far: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Runtime.Serialization; public partial class PlayersManagement : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { LoadData(); } } public void LoadData() { if (ViewState["CurrentGridView"] != null ||
ASP.NET Community Standup Forums Help Home/ASP.NET Forums/General ASP.NET/Getting Started/Error serializing value/ViewState Error serializing value/ViewState [Answered]RSS 1 reply Last post Aug 17, 2007 04:26 AM by DMW ‹ Previous Thread|Next Thread › Print Share Twitter Facebook Email Shortcuts Active Threads Unanswered Threads Unresolved Threads Support Options Advanced Search Reply sujithukvl@g... Member 328 Points 702 Posts Error serializing value/ViewState Aug 17, http://stackoverflow.com/questions/24191054/how-to-serialize-a-viewstate-objects 2007 03:44 AM|sujithukvl@gmail.com|LINK ViewState("SearchProducts") = SearchedProducts the line above causes error SearchedProducts is of type List(Of Products) where Products is my class the error message is as follows 'Error serializing value 'System.Collections.Generic.List`1[Products]' of type 'System.Collections.Generic.List`1[[Products, mynamespcace, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].'' how can i insert/add values to view http://forums.asp.net/t/1147560.aspx?Error+serializing+value+ViewState state with out erros Reply DMW Contributor 5014 Points 2403 Posts Re: Error serializing value/ViewState Aug 17, 2007 04:26 AM|DMW|LINK Everything that you want to put into ViewState must be serializable, so make sure that you mark your Product(s) class with the
Marketing Community Engagement Ideas Answers Discussions Groups Wikis Events Mobile ReadyEvoq Intranet Governance Employee Portal Collaboration Gamification User Profiles Personalization Document Management Analytics IntegrationsEvoq: CMS FeaturesEvoq OnDemandProduct DemosCompare ProductsCompare DNN Platform to Evoq Solutions Customer EngagementMarketing & ECommerceCustomer SupportProduct DevelopmentMember EngagementEmployee IntranetOur Customers Learn More Test DrivesSchedule A http://www.dnnsoftware.com/forums/threadid/449504/scope/posts/error-serializing-value DemoWebinarsWhite PapersProduct ManualsRequest PricingData SheetsCase StudiesVideosEvoq Preferred Products Content Management Ecommerce Forms Identity Management and Authentication Site Management Social Themes Partners DNN Partners Partner Directory Become a DNN Partner http://geekswithblogs.net/DheemanDutta/archive/2006/06/13/81689.aspx Community Participate Community Exchange Community Voice Community Showcase Community Forums Working Groups Members Module ContestLearn Project History Documentation Center Community Blog Video Library Wiki Development Online Help RoadmapConnect DNN MVP Community Leaderboard Community Newsletters Community Events Community HangoutDownload DNN Forge Language Packs Manuals Nightly error serializing BuildsSecurity Policies Security Center Blog About Leadership Management InvestorsNews Press Releases News Coverage Press KitCareersContact DNN Download DNN Platform Whitepapers Manuals Support Store DNN Modules DNN Themes Store Blog Evoq Preferred Services Login REGISTERBecome a DNNizen > Submit DNN Products Evoq Content Overview Content Creation Workflow Asset Management error serializing value Mobile Responsive Personalization Content Analytics SEO Integrations Security Website Performance Evoq Engage Overview Community Management Gamification Advocate Marketing Community Engagement Mobile Ready Evoq Intranet Governance Employee Portal Collaboration Gamification User Profiles Personalization Document Management Analytics Integrations Evoq: CMS Features Evoq OnDemand Product Demos Compare Products Compare DNN Platform to Evoq Solutions Customer Engagement Marketing & ECommerce Customer Support Product Development Member Engagement Employee Intranet Our Customers Learn More Test Drives Schedule A Demo Webinars White Papers Product Manuals Request Pricing Data Sheets Case Studies Videos Evoq Preferred Products Content Management Ecommerce Forms Identity Management and Authentication Site Management Social Themes Partners DNN Partners Partner Directory Become a DNN Partner Community Participate Community Exchange Community Voice Community Showcase Community Forums Working G
Generic EventHandler a new way of handling events A problem with the Accordian control A Good-Bad Feeling Identity among Objects Create Your Own Validator Anonymous Methods and delegates DB Creation News Post Categories BizTalk Mapping Windows Phone 7 5010 Visual Studio 2010 SQL Visual Basic 6.0 Android Training Azure Dallas C# Certification ASP.Net Redgate Astronomy .Net Review Java Blogroll Everything Else Kindle EDI eBay Windows 8 Windows Store Visual Studio 2012 Books Archives January 2010 (2) May 2009 (1) January 2009 (1) December 2008 (1) July 2008 (1) January 2008 (2) June 2007 (1) May 2007 (1) April 2007 (3) February 2007 (1) January 2007 (2) December 2006 (1) November 2006 (3) October 2006 (1) September 2006 (4) August 2006 (1) July 2006 (7) June 2006 (7) Dheeman Dutta Just Another Blog..... << Getting Values After Server.Transfer | Home | StringCollection Vs ArrayList >> Problem storing a Generic list object in Viewstate Comments (15) | Share I had an generic object that implements and I was just trying to store that object in ViewState. THis was where i first stumbled as it was giving me an error that basically tells that "Cannot serialze a generic list object". After I did a bit of googling I found out that I need to make that object XmlSerializable inoder to be strored in Viewstate. I used the [serializable ] attribute on the class that I wanted to serialize. Still i was giving me error. After a quite prolonged step into this problem my senior(read Project Manager) found out a nice cool solution. I addition to that attributewhat he did is as follows. public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { // Quickly Illustrate Creation of a List of that contains information; List