Web Control in ASP.NET (Discuss)

bungpeng

Well-known member
Joined
Sep 10, 2002
Messages
906
Location
Malaysia
Previously I am using ASP, now compare with ASP.NET, people use Web Control for all HTML form elements like textbox, combobox... (example: <asp:text box....>)

What I think is: is it logically this will be slower than I only use normal HTML form elemtns? (example: <input type=text...>) I concern it because speed is very important for web application.
 
Just for fun, place a couple of ASP textboxes on your page then in the browser look at the code (View Source) you will see that it renders HTML textboxes.
The point is, whichever one you use will be put together on the server then sent to the client. And the speed on the server should not even be an issue.
 
Taken from Wrox Press Profession ASP.NET:

In general, a page that uses server controls instead of HTML elements results in something like a 30% drop in performance each time the page is generated. However, this is only an average - you DONT get a compounded 30% penalty hit for every control. Besides, if you use server-side code to set the values of controls using traditional ASP techniques, you generally get worse performance compared to using the ASP.NET server controls...

On a side note, I generally only ever use server controls where I will be interacting with the control in my ASP.NET code.

Tryster
 
I agree with what Wrox said from Tryster, because server control need server process but HTML no need.

So, our summary is: Try to avoid server control if possible to get the better performance. Right?
 
Back
Top