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

How long do session variables last?

535


We are using Jscriopt validations and at clint site javascript is not running that time validation would work? if yes then how it would behave?

1414


What is the namespace to create thread in .net?

536


What is a runtime version?

543


What is the full meaning of asp.net?

530






How can we inherit a static variable?

552


How to fetch a data from one table to another table in asp.net ?

591


Explain the asp.net session state modes.

627


How Can assign alias name for ASP.NET Web API Action?

942


We Only Know The Total Number Of Feet In The Farmyard. Write A Program that will compute the total number of rabbits and chickens in the farmyard. Assume number of feet in the farmyard are 40. how many rabbits and chickens are?

448


is gateway for sms continue connected for sending sms.how?

1837


What is a form tag?

516


In a webservice, need to display 10 rows from a table. Which is the best choice among datareader or dataset?

662


What does a switch do?

546


How is it possible for .NET to support many languages?

316