Difference between HTML control and Web Server Control?

Answer Posted / harshad lakkad (bapunagar part

--Web server Control
Web server controls are just like HTML controls...
only different. Let me clarify that.
Web controls are easily identified by the fact that they
have a
runat="server" attribute. They are also handled at the
server by
the ASP.NET runtime when a page containing them is
requested.
They can expose and raise server events which you can use
to
interact with them. They are identified by giving them an
id
attribute which you can then use to reference the control
in
your code. In all these ways, web controls are just like
HTML
controls.

--HTML Controls

The HTML controls might feel slightly quirky if you are
used to forms based development with Microsoft tools. For
instance, HTML controls have no direct properties
available
to set the colors or font used by the control when it
renders.
Another example is the Value property exposed by the
HtmlInputText
field. We generally expect a text box control to have a
Text property
for us to get or set the string to display.

In this sense, HTML controls remain true to their roots and
are
not far removed from writing just HTML. If we want to set
colors
or font information – we can use the Attributes property.
The Attributes property represents all the name / value
pairs in
the HTML element for the control. For example, a control
might have
an attribute “class” which will assign the cascading style
sheet
class. In the example above, we are assigning some inline
style
information to the style attribute of the control. On the
client
this attribute will render inline with the element.

Is This Answer Correct ?    15 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do you know about caching with the datasource controls?

486


What are assemblies and namespaces and explain the difference between them ?

570


What is preprocessor in .net and type, where it use?

662


What are session cookies?

547


What is actually returned from server to the browser when a browser requests an .aspx file and the file is displayed?

536






What is owin authentication?

520


What is s2s tracking?

537


How to Separate background image and front image from original picture....

559


What are the new data controls in asp.net 2.0?

526


What are the session management techniques asp net?

566


What would be salary for 8+ years of experience in ASP.NET in different metro city in india?

1990


Can you set which type of comparison you want to perform by the comparevalidator control?

526


Why asp.net is better than php?

493


How to add DateTime Control in normal DataGrid Server Control?

584


What is dynamic web page with example?

528