473,378 Members | 1,393 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Difference between Html Element and Web Controls

SAI
Both have "TextBox" element and "Runat server". I don't understand the
difference. Please advise. Thanks.
Nov 19 '05 #1
4 2418
Html and web controls inherit from different parents and have different sets
of properties, methods and events. If you need any sort of functionality
specific for web controls, use them. Otherwise use html ones, they are
lighter.

Eliyahu

"SAI" <te**@test.com> wrote in message
news:Oj**************@TK2MSFTNGP14.phx.gbl...
Both have "TextBox" element and "Runat server". I don't understand the
difference. Please advise. Thanks.

Nov 19 '05 #2


SAI wrote:
Both have "TextBox" element and "Runat server". I don't understand the
difference.


ASP.NET tries to provide controls that are close to the HTML elements
and the client-side browser object model (the HtmlControls) and controls
which are close to the API Windows developers are used to from WinForms
GUI development.
There is some overlapping functionality that way and it is up to you to
decide what you prefer.

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Nov 19 '05 #3
Not quite.

There are actually 3 "families" of controls to choose from:

HTML Controls are standard HTML controls that have been a part of the HTML
language for years. These are not classes, they are tags and you can only
do client-side programming with them.

HTML Server Controls are the exact same as above but have: runat="server"
added to them. These controls add server side programmatic capabilities to
the otherwise standard HTML Control. Use these controls when migrating old
web applications to .NET applications.

Web Form Controls (a.k.a. Server Controls) are .NET Classes that expose a
rich set of properties, methods and events. They are programmable on the
client and/or the server. There are some that offer the same UI as HTML
Controls but have more features and there are some that offer a much richer
UI that would take quite a bit of programming if they were to be made in
standard HTML from scratch (i.e. Calendar Control, DataGrid Control,
Validation Controls). All of these controls render to the client as HTML
and/or CSS and/or JScript. Use these when rich UI's and/or rich
programmatic capabilities are needed.


"Martin Honnen" <ma*******@yahoo.de> wrote in message
news:Ob**************@TK2MSFTNGP09.phx.gbl...


SAI wrote:
Both have "TextBox" element and "Runat server". I don't understand the
difference.


ASP.NET tries to provide controls that are close to the HTML elements and
the client-side browser object model (the HtmlControls) and controls which
are close to the API Windows developers are used to from WinForms GUI
development.
There is some overlapping functionality that way and it is up to you to
decide what you prefer.

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/

Nov 19 '05 #4
Take a look at the list of their classes :

HTML Controls :
http://www.csharpfriends.com/quickst...I.HtmlControls

WEB Controls :
http://www.csharpfriends.com/quickst...UI.WebControls

You'll notice a LOT of differences.

Drilling down ( by clicking ) in the HTML controls to the HtmlInputControl:
http://www.csharpfriends.com/quickst...mlInputControl

will show you the differences between that control and the Textbox web control:
http://www.csharpfriends.com/quickst...&class=TextBox

There's some crossover between web controls and html controls,
but the differences between them are many.

Keep those links handy whenever you need to know the
difference between any other controls supplied both by

System.Web.UI.HtmlControls
and
System.Web.UI.WebControls

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"SAI" <te**@test.com> wrote in message news:Oj**************@TK2MSFTNGP14.phx.gbl...
Both have "TextBox" element and "Runat server". I don't understand the difference.
Please advise. Thanks.



Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

50
by: MozillaCensorsMe | last post by:
Hello, While I haven't finished my wonderful tutorial to save the world, I do have a simple question. What's the difference between h1 and the title tag? For me it seems as though both can...
5
by: Richard Cornford | last post by:
I am interested in hearing opinions on the semantic meaning of FORM (elements) in HTML. I have to start of apologising because this question arose in a context that is not applicable to the...
4
by: clintonG | last post by:
Technically speaking, this issue is not about modifying the HTML generated by server controls but preceding the HTML generated by server controls with an HTML control generated on the basis of the...
8
by: Alan Silver | last post by:
Hello, ASP.NET newbie here so please be nice ;-) I'm reading ASP.NET Unleashed, following a recommendation here. I am a little confused about the difference between HTML controls and web...
1
by: Beffmans | last post by:
Hi I work with .net 1.1 and i wanted to know the difference between a html table and a <asp:table>? Which one is better for a consistent layout of your asp.net pages? ch Beffmans
4
by: Sathyaish | last post by:
I am no JavaScript progammer, and unfortunately am having to babysit an old code base that has a lot of JavaScript in it. I have two questions: (1) Can two HTML controls have the same name? It...
12
by: Eric Layman | last post by:
Hi, What's the difference between a normal web element: <input type="text" id="txtname" name="txtname" runat="server"> vs webcontrol text box: <asp:Textbox id="username" Columns="10"...
5
by: archana | last post by:
Hi all, can anyone tell me difference between htmlcontrols and web controls. If i have table web control and table html controls which one should i use. Because i can add runat tag to html...
9
by: dhtml | last post by:
I have written an article "Unsafe Names for HTML Form Controls". <URL: http://jibbering.com/faq/names/ > I would appreciate any reviews, technical or otherwise. Garrett --...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.