Posted by Elliott Nash |
Filed under .net, vb, listitem, itemtemplate, e.item.findcontrol
How to use .Net ListItem in the real world
When starting out with .Net the built-in server controls can appear a bit daunting - especially if coming from a classic ASP or PHP background (where you simply write HTML elements out as a string). In this post i will run through an every day example of how to use a ListItem to display data and customise the output via the ItemTemplate.
A .Net ListItem can be used to bind data from a datasource (SQLDataReader, DataTable, ArrayList, GenericList etc...) to display to the end user. The display can be customised through the use of the <itemTemplate> as follows: More...
07a6cc65-cfa7-445f-aeab-bdfd0dbf3b0c|0|.0
Posted by Elliott Nash |
Filed under validation of viewstate mac failed, .net, vb, c#, http exception, viewstate mac
I was simply attempting to post a form from one page to another when i encountered the following error:
HttpException (0x80004005): Validation of viewstate
MAC failed. If this application is hosted by a Web
Farm or cluster, ensure that configuration
specifies the same validationKey and validation
algorithm. AutoGenerate cannot be used in a cluster.
It seems when developing with .NET 2.0 or later there is a bug in the framework which can become apparent if the following conditions are true: More...
759a11c8-e615-4531-8d48-331b2a576581|1|4.0