User controls are great encapsulating both behavior and looks. When you have some UI elements that you want to use in more than one place a User control is a great way to add reusability.
One problem that you can run into is how you add communication from the user control to the web page. Perhaps you have a button in a user control, and when you click it the web page should perform some action. If the button was on the page we would simply bind to the Clicked event on the button, but when it?s inside of the user control we don?t have access to the button.
One way to remedy this is to add an event to user control that is triggered when the button is clicked. In this article I will demonstrate how to do this. ...
Go to the complete details ...