UserControl.SaveViewState Method ()

 

Saves any user control view-state changes that have occurred since the last page postback.

Namespace:   System.Web.UI
Assembly:  System.Web (in System.Web.dll)

override SaveViewState : unit -> Object

Return Value

Type: System.Object

Returns the user control's current view state. If there is no view state associated with the control, it returns null.

In general, you do not need to call this method. However, if you store custom information in view state, you can override this method to do so.

The following example demonstrates a user control that manages its view state using the LoadViewState and SaveViewState methods.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: