Why should you go for Server Controls?The main reason for going for the server controls is that they are programmable and can be manipulated with the program during runtime. The server controls are understood by the server and it is easy to handle them. They have an object oriented programming model which has properties and events attached to them and this makes it easy to program them during runtime. They have rich set of properties, events, and methods. If you are using the ordinary html controls for presentation then you would writing the content to be displayed in the exact place where it has to be displayed. With this you have to browse through the whole page and edit them if you want to change them. If you are using server controls you can write the code to be executed separately and you can also edit them easily without going through the whole design page to change the content. Server controls also help you to validate the user input against some value or a range of values. You can display an error message if the user input is not valid. These types of validation server controls are more useful when you want the users to fill up some forms in the web page. It is also possible to prevent validation by setting CausesValidation property to false.
|