Victor Garcia Aprea : Wednesday, June 09, 2004 - Posts

Subscriptions

<September 2010>
SuMoTuWeThFrSa
2930311234
567891011
12131415161718
19202122232425
262728293012
3456789

Post Categories




Wednesday, June 09, 2004 - Posts

Viewstate Serialization, one more time!

I just read Scott Mitchell’s article about viewstate where he’s explaining how viewstate serialization works and he’s saying:

 

“…The LosFormatter can serialize any type of object that can be serialized by the BinaryFormatter class…”

 

Watch out! That’s partially wrong. That is not complete and might lead you to believe that you need to make your type serializable by the BinaryFormatter in order to be able to store it into viewstate: that’s not true. As I explained in a previous post the LosFormatter will try using an associated type converter *before* getting to a BinaryFormatter. So, a type that is not serializable by a BinaryFormatter can still be serialized by the LosFormatter. It’s a real pity that none of the info that I’ve been detailing on some of my latest posts got mentioned into that article :-(

 

The reason I’ve been sharing this viewstate low-level details is because I couldn’t find them anywhere else on the web… and there is lot of misconceptions about how this really works, you can easily notice that by browsing the public newsgroups… Hey, even the Mono guys got it wrong at first but after I shout they quickly fix it.

 

posted Wednesday, June 09, 2004 7:33 PM by vga with 4827 Comments