473,624 Members | 2,103 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2434
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.co m> wrote in message
news:Oj******** ******@TK2MSFTN GP14.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*******@yaho o.de> wrote in message
news:Ob******** ******@TK2MSFTN GP09.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 HtmlInputContro l:
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.H tmlControls
and
System.Web.UI.W ebControls

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.co m> wrote in message news:Oj******** ******@TK2MSFTN GP14.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
5903
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 be used interchangebly. For example, the articles on my site (andkon.com) have the same title as h1. Comments?
5
6082
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 Internet. Specifically, marking up a document that will contain multiple related form controls (intended exclusively for client-side scripting) that would never be intended to be submitted. I realise that that concept is a non-starter in an Internet...
4
1972
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 type and the context of the server control itself. Clear as mud? :-) Consider the following server control... <asp:textbox id="MemberEmail" runat="server" ></asp:textbox> TextBox renders at run-time as an HTML control... <input...
8
2042
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 controls. Obviously there are web controls that don't have any relation to HTML controls (like the calendar), but the basic web controls that produce links, labels, etc seem to do the same as the HTML controls (or vice-versa).
1
2681
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
1993
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 looks like the obvious answer is NO. (2) What if? What if the developer has given two HTML controls the same name, i.e has created the same button more than once with exactly the
12
3238
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" runat="server"> </asp:TextBox>
5
2071
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 controls. so what is exact difference between these two. any help will be truely appreciated.
9
2504
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 -- comp.lang.javascript FAQ <URL: http://jibbering.com/faq/ >
0
8173
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8679
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8621
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8335
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8475
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4079
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4174
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2606
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1482
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.