Question : Does ASP.NET Control Reduce Effeciency? - Is It Better to Use the HTML Tags? - ASP.NET

1. Is using alot of ASP.NET control tags make my website slower? I found myself using alot of Labels such as >, every time my page goes to the server, the server will have to go through all these ASP.NET tags. On the other hand, if i put the equivalent of , the server wouldn't have to go through many ASP.NET control tags which in turn makes the post back faster. I could be wrong, please advise.

2. How is it done practically in majority of companies? Do they prefer using HTML tags more than ASP.NET tags?

3. I'm not seeing any advantage of using ASP.NET controls when the control is not an interactive such as static texts, images, etc. Is there any down sides when using HTML tags instead ASP.NET controls?

Answer : Does ASP.NET Control Reduce Effeciency? - Is It Better to Use the HTML Tags? - ASP.NET

Well, the user of server controls makes your site slower. Those controls must be processed in the server and finally renders out in equivalent HTML tags. If you use directly HTML tags, that processing does not happens.

So, if you can, use HTML tags. When do you have to use server controls? Well, it's easy... when you need to access those controls on the server.

Imagine this scenario (it's a real scenario based on a real web application I'm working with): I have a web site that must be able to show in different languages by user selection. So I have many labels and other controls that, depending on the user language selection, must show different texts. The algorithms and processing that does the translation relies on the server. So I need server labels, because on each Page_Load I've got a code that recursively get all the server controls on the page and applies the translation based on session variable holding the user selected language. In these same pages, I show images that doesn't need translations because doesn't contain text. So for those images I dont use the Image server control, but I use the HTML tag.

Hope that helps.
Random Solutions  
  •  How can I print using a Clipper (DOS) application under Windows 7
  •  can i use right([ClientName] to get the last part of a string in a Microsoft Access query if i don't know how long the last part is?
  •  Problem with Joomla email cloaking
  •  msaccess 2003 and turning on a new menu toolbar from module code and turning off the main menu from the same place
  •  Purge Deleted items from database immediatly after message recall
  •  How do I remove special characters in a query?
  •  VPN client (Check point Secure client) not able to browse to any website on the machine once connected to the VPN.
  •  Mixed tooltips using AddTool (GetDlgItem (IDC_THIS), IDC_THIS) and AddTool (this, LPSTR_TEXTCALLBACK) how to.
  •  Cannot use remote executables after I upgraded to R2
  •  How do you import outlook express 6 messages into Windows Live Mail and have them in the proper folders?
  •  
    programming4us programming4us