Prev | Current Page 343 | Next

Rob Cameron and Dale Michalk

"Pro ASP.NET 3.5 Server Controls and AJAX Components"


LoadViewState Method
Overriding the LoadViewState method is necessary if a control has previously overridden
SaveViewState to customize ViewState serialization. Customization of the ViewState persistence
mechanism is commonly performed by developers in more complex controls that have complex
properties such as a reference type or a collection of objects. The decision to customize ViewState
really comes down to whether or not a control??™s state can be easily or efficiently reduced to a
string representation.
LoadControlState Method
Overriding the LoadControlState method is necessary if a control has previously overridden
SaveControlState to customize ControlState serialization. Customization of the ControlState
persistence mechanism is commonly performed by developers in more complex controls that
have properties that must always be available even if ViewState is not available.
LoadPostBackData Method
In the previous chapter, we discussed how to retrieve client form post data via implementation
of the IPostBackDataHandler interface. The LoadPostData routine is given the opportunity to
process the postback data and to update the control??™s state. It also allows the control to notify
ASP.NET that it wishes to raise an event at a later time in order to permit clients a chance to
process the state change.


Pages:
331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355