html vs web controls
-
hi friends when should i use html or when should i use web controls when designing web pages. what are the advantages and disadvantages of each. why are there actually two types of controsl. any help appreciated. anand anand
I got a answer from the following link --> What do you people think about this. Is this ok. Does any one like to add some thing to this. Any way thanks to Mr.glsac for this posting in the link below. http://www.ipdg3.com/forums/showthread.php?s=7f10056c91da922279d396089df26820&p=5259#post5259[^] I have answered this question a few times already...and I think I am just going to post the answer here and direct people to it when I respond to them The question I am getting often is: We have two types of controls in ASP.NET, we have HTML controls and Web Controls. Web Controls have some more than HTML, but when do you use one over the other? My Answer (feel free to add onto it). First of all, there are really more than two controls. There are also mobile controls, validation controls, user controls, and custom controls...but yes, I know what you mean by two :-) In any event it comes down to the exact functionality of the page for what type of control you should use. Both can co-exist on a page as well, so you don't have to choose one over the other for a whole page. I base my decisions off the following... HTML Server Controls: 1. If I convert from ASP 3 to .NET and I need to do this quickly, it is faster with HTML controls. Granted only once this was the case 2. If you like the HTML programming model, someone told me he likes it..so go for it! 3. If you want to control teh HTML code output that is generated for the browser...web controls do not allow this Web Server Controls: 1. If you want a VB style programming :-) Just drag and drop controls, and configure in properties almost everything! 2. If you need more functionality on your web page. 3. Web Server controls generate output based on browser type (that is why they are called Smart Controls)...so unless you want to write code to check for browser version and output different HTML...web controls will do this for you. In general, learn both...I find the input control to upload a file very useful, and witha reset button...well some use it, I would rather use a web control button and in code behind set all textboxes to " ". It is up to you, but learn both...in general if you start from scratch on a new site, then start off with the Web Server Controls, and use HTML contro
-
hi friends when should i use html or when should i use web controls when designing web pages. what are the advantages and disadvantages of each. why are there actually two types of controsl. any help appreciated. anand anand