"
ASP.NET (snapshot 2017) Microsoft documentation and samples

[How Do I]: Persist the State of a User Control During a Postback

by Chris Pels

In this video Chris Pels shows how to persist the state of one or more objects in a user control. First, a user control is created that represents the ability for a user to specify filter criteria for a search. In addition, a companion Filter class is created to store the filter information. Several user interface elements are added to the filter control along with some methods and properties to store the current filter information in the Filter class instance. Next, the user control persistence is implemented using the RegisterRequiresControlState method and associated Save/Restore methods. These methods store the instance of the filter class and its data during page postbacks. Finally, there is a discussion of how to store multiple objects in control state implementation.

▶ Watch video (23 minutes)



Comments ( )
Link to this page: //www.vb-net.com/AspNet-DocAndSamples-2017/aspnet/web-forms/videos/how-do-i/how-do-i-persist-the-state-of-a-user-control-during-a-postback.htm
< THANKS ME>