Showing posts with the label VB

What is Custom Controls in ASP.NET and What is User Controls in ASP.NET: Part 1


I hope you must be aware about the User Controls. Ok. Don't worry I am trying to explain it in my own words. User control enables us to build a new control from existing controls. By taking advantage of User controls, we can easily extend the ASP.NET Framework with our own custom controls. Imagine that we need to display the same address form in multiple pages in a web application. The address form consists of several TextBox and Validation controls for entering address information. If we want to avoid declaring all the TextBox and Validation controls in multiple pages, we can wrap these controls inside a Web User control. Anytime, that we discover, that we need to display the same user interface elements in multiple pages, we should consider wrapping the elements inside a User Control. By taking advantage of User controls, we make your website easier to maintain and extend.

Now let's start building a simple User control that will randomly display one image from a…

Popular posts from this blog