Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 3rd, 2006, 08:07 AM
Registered User
 
Join Date: Nov 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default asp server controls Vs HTML tags

if i am using asp.net web control like "<asp:Button>"
and as an alternative <input type="submit">....

then what is the major difference....

if an equivalent html tag is already present then why we need an asp server control........

please explain me as an beginner.....
tx....

 
Old November 3rd, 2006, 04:33 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

An <input type="submit" runat="server" /> is considered an HtmlControl. An <asp:Button /> on the other hand is a WebControl.

Generally, WebControls are more versatile. This means they offer more features than their HtmlControl counterparts. However, they're also a bit heavier in terms on performance / overhead, although I doubt you'll notice the difference in day to day websites.

All HtmlControls have a direct one to one mapping with an HTML input control; while WebControls don't necessarily have that.

Read more about them here:
HtmlControls namespace

WebControls

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.





Similar Threads
Thread Thread Starter Forum Replies Last Post
HTML tags is not working in textarea in ASP.net suman9730 General .NET 1 May 23rd, 2006 04:48 AM
html tags in asp:textbox sureshbabu VS.NET 2002/2003 2 May 3rd, 2006 12:30 AM
return a string with all HTML and ASP tags strippe ccc_storage ASP.NET 1.x and 2.0 Application Design 2 September 23rd, 2004 10:43 PM
ASP.NET Server Controls sstchur C# 0 August 2nd, 2003 07:52 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.