Saturday, March 24, 2012

Thought about server controls

Hi all, I'm new to web app development and jumped right into ASP.NET - so of course I created an application full of asp:xxxxx controls with runat=server. Now I wonder if this is really not the recommended practice? Are there times that a plain old input box or drop down list would do better? Any advice would be appreciated! Thanks!Hello,

there are a few differences between these two kind of controls. In the following i just describe what i´m actually remember but maybe there are a bit it more...

First of all i give you a link where you can read the differences in detail:Introduction to ASP.NET Server Controls

Second is here a short summary:

1. Browser Compatibility
The HTML Server Controls have no mechanism of identifying the capabilities of the client browser accessing the current page.

ASP .NET Server Controls can however detect the target browser's capabilities and render themselves accordingly.

2. Object Model
The HTML Server Controls follow the HTML-centric object model.

ASP .NET Server Controls have an object model different from the traditional HTML and even provide a set of properties and methods that can change the outlook and behavior of the controls.

Sometimes i have heart that ASP.Net controls are a little bit more slowly than the appropriate html controls but i haven't experienced this by now...

Regards,
Ok, so you haven't experienced slower pages with server controls than a HTML control? I guess that is my main concern, I just want to make sure I am not wasting processor time with server controls when I may not really need them.
There is an overload. All the extra property and method of the asp.net version of the standard HTML need to be stored somewhere, as in the server memory.

While you may not experience slowdown, using them only when you need the extra fonctionality is the way to go IMHO.

What too much of them is will be up to you to decide though.
Thank you soo much!

0 comments:

Post a Comment