Why we need both server controls and html controls in asp.net. what is the difference between them?

Questions by jacintha

Showing Answers 1 - 2 of 2 Answers

Anilkumar Mantena

  • Jul 24th, 2006
 

HTML Server Controls:

This controls will follow similar syntax of html client side controls with the same set of properties (with runat="server" attribute).  The purpose of this HTML Server controls is towards migration projects.   And this HTML Server Controls doesn't support extensibility.

Web Server Controls:

These are very advanced controls if compared to HTML Controls.  These controls overcome the extensibility problem which araises in HTML Server Controls.  These controls are also called as Smart Controls, because these controls will produce HTML context based on reuested browser.

These Controls also supports data binding and xml based syntax with .net object model.

  Was this answer useful?  Yes

We require HTML Control in some of circumstances:

1) Migrating Project from ASP to ASP.NET u just need to add Runat="Server" and ID="XYZ" , so
you do not need to make big changes to current project

2) If you have use frequently Client side JavaScripts

Disadvantage of HTML Control

1 ) HTML Control don't have a programming model that consist with WinForm Programming

E.g: HTML TextboxControl :: Value Property
ServerControl TextboxControl :: Text Property

2) HTML server control directly map to a single html tag.

Thanks

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions