I personally like option one below for maintainability but I could see option two getting me better performance. Option three is probably complete garbage.
1. ViewState['Calendar1.SelectionMode'] = Calendar1.SelectionMode; 2. ViewState['CSM'] = Calendar1.SelectionMode; 3. ViewState['Calendar1_SelectionMode'] = Calendar1.SelectionMode;
Am I applying old school habits of thinking about the maintenance? Does it matter only when the number of objects is large? I cannot see the internals using anything but a very efficient hash. I have read up on methods to speed up the page loading but nothing directly advising as this being even a slight factor. All the literature talks about is prefering the viewstate over database access reads, using compact types, populating only those values that take on non default values.
Option two will probably give you better performance, but the difference is extremely small. If you’re experiencing performance problems this would be one of the very last places I would look for bottlenecks. Have you run any kind of profiling on your page? That’s where I would start looking.