Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > Other ASP.NET > ASP.NET 1.x and 2.0 Application Design
|
ASP.NET 1.x and 2.0 Application Design Application design with ASP.NET 1.0, 1.1, and 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.x and 2.0 Application Design 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 October 27th, 2005, 12:40 AM
Registered User
 
Join Date: Mar 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default difference between htmlserver control and webserve

Hi,
I want to know
1--when to use htmlserver control and when to use webserver controls?
2--what are the basic differences when these controls are processed on server?

thanks in advance.

sarvesh upadhyay
 
Old December 1st, 2005, 03:21 PM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 449
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to r_ganesh76
Default

by default the html contorls come with runat attribute not set. ie. they cannot be accessed from the server side. However, once you set the runat="server" atttribute, both behave in the same way. Any way once they come to the client side, all is plain html

html contols are processed on the server, only when the runat atribute is set to "server"

Regards
Ganesh
 
Old December 3rd, 2005, 11:09 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

One notable difference I will add to Ganesh's answer:

System.Web.UI.HtmlControls and System.Web.UI.WebControls can be manipulated similarly at the server (many similar controls share many of the same properties), however only WebControls will have the most useful events at the server. (I say "most useful" because HtmlControls do have some events but they are typically not used very much, I've never used one yet.)

-Peter
 
Old December 4th, 2005, 02:08 PM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 449
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to r_ganesh76
Default

Peter is right. Mostly we dont use html controls in your application which has a runat="server" attribute. However, I use htmlInputButton in most of the pages having more than one commandbutton to make the asp button the default button. Other than that i dont use any other html contorls which are available at the server.

Regards
Ganesh





Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference ashu .NET Framework 1.x 1 March 27th, 2007 09:46 AM
what's the difference? jdkxxx Oracle 3 October 8th, 2005 12:33 PM
what is the difference? chuck_schuldiner Javascript How-To 2 February 10th, 2005 01:46 AM
What is the difference between these two? ramk_1978 SQL Language 1 January 14th, 2005 11:16 AM
Difference betn Data grid, List, Repeter control cumadhu ADO.NET 2 December 17th, 2004 02:46 AM





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