User control not updating

The employee-list user control stores the ID of the selected employee in view state.

It makes sure that only the selected employee is highlighted in the control, regardless of which page of data is displayed or of how the list has been sorted.

Let’s say you try this: You will not receive an error for trying to set the user control’s data context.

You will, however, discover that all data binding has stopped working. Rather than explain why this is happening, let me simply share the solution.

In this tutorial and the next three we will be examining various Membership-related functions and capabilities. NET pages to implement the topics examined throughout these tutorials.

Binding inside your user control isn’t exactly obvious either.

The reason is, you get an error when you attempt to set the data context of the user control.

It’s up to use to use the mode that is appropriate for the controls you are embedding in your user control.

The dependency property does the rest – and that’s that!


Leave a Reply