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

Please install Silverlight or click download to watch video locally.

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.

Presented by Chris Pels

Duration: 23 minutes, 15 seconds

Date: 02 April 2009

Watch    Video   |   Download    Video   |   VB Code    C# Code

Video downloads: WMV  |  Zune  |  iPod  |  PSP  |  MPEG-4  |  3GP

Audio downloads: AAC  |  WMA  |  MPEG-4  |  MPEG-3  |  MPEG-2

Comments : 13

Leave a Comment

BEHPAK : On April 03, 2009 1:09 PM said:

hi mr. pels

so when can we see FCKeditor or FreeTextBox Video ?!

FelixRMelendez : On April 03, 2009 4:16 PM said:

C# code can't be downloaded :-(

abhinandanbansal : On April 05, 2009 1:42 PM said:

Creation of user control is clear in this video :-) but the use of this is not much clear in this video :-(

volatile : On April 06, 2009 11:45 AM said:

C# code can't be downloaded like someone(Felix) above said....

Also ,videos is a very good ,excellent.

shilpa.gururao : On April 07, 2009 12:13 PM said:

Its good. But Significance I didnt get.

Connexity : On April 07, 2009 3:05 PM said:

No C# code...

markive : On April 08, 2009 1:23 PM said:

Most controls have their own built in persistant state don't they? Why would I go to the trouble of re-writing it.. Good video but some context please!!!

pwagyi : On April 11, 2009 5:46 AM said:
ammarcool : On April 15, 2009 11:23 AM said:

still i was unable to download the C# video. :(

pwagyi => the link also not working.

abelanet : On April 27, 2009 8:18 PM said:

C# code not downloadable even the link provided

schprit : On April 28, 2009 1:17 PM said:

for the C# code copy and paste the link above...

IE doesn't handle the %22%20target=%22_blank in the underlying link...

uwspstar : On May 04, 2009 2:19 PM said:

cannot download C# video, VB video is good !

tmorton : On May 07, 2009 6:24 PM said:

We've now corrected the C# code link, and note that there is only one version of the video.

Leave a Comment

You must be logged in to leave a comment. Click here to log in.

Microsoft Communities