Html V/S Web Server Controls

hi everyone!

i am new to this forums and as well as in asp.net.  i am doing self study on asp.net 2005 using C# .

here i just want to know difference between html server control and web server control. as per my understanding when i drag a control to a web form from the tool box then the code that is automatically comes up in the inline code file is html server control and the code on code behind file is web server control. i am not getting the difference exactly as web controls are all on toolbox but where is html control visually.

pls help. 

 thank you.
 


This is the place to learn everything on asp.net. I thank to all who help me.
0
sawan
5/26/2007 4:27:30 AM
asp.net.web-forms 93655 articles. 6 followers. Follow

2 Replies
527 Views

Similar Articles

[PageSpeed] 47
Get it on Google Play
Get it on Apple App Store

hi friend., 

  The HTML controls (client controls) are the same HTML 4.01 controls that
have been part of the HTML language for a very long time. Use these when
their native client-side functionality serves your purpose (lowest overhead
with these controls).

The HTML Server controls are the same as above but with added server-side
programming/viewstate capabilities. Use these when migrating a "Classic
ASP" application to ASP.NET and you won't have to completely replace all
your old controls with new ones to get the .NET benefits of them. While you
do get some server-side programming capabilities with these, you don't get
the full range of properties, methods & events that pure server-side
controls offer.

The Web Form controls (a.k.a. Web Server controls) provide .NET native
server-side programming support. The properties, methods and events of
these controls are more VB like than the HTML controls. These controls
offer the widest range of flexibility from a programming standpoint, but can
(if not used correctly) create more overhead (viewstate) for your .aspx
pages.

The Web Form controls also feature controls that don't have an HTML
equivalent (validation controls, data controls, other rich controls
[calendar]). No matter which Web Form control you use, they render
themselves to the client as pure HTML/JavaScript, so they can be used in any
client!

 

hope this helps./. 


Thanx,
[KaushaL] || BloG || Profile || Microsoft MVP

"I would love to change the world, but they won’t give me the source code"


Don't forget to click "Mark as Answer" on the post that helped you.
This credits that member, earns you a point and mark your thread as Resolved for the sake of Future Readers.
0
kaushalparik27
5/26/2007 4:41:02 AM

An HTML control would look like:

  <div id="myDiv" runat="server"> ... </div>

That is, you take a normal HTML tag and turn it into a server control with the runat="server" attribute. ASP.NET will give you an HtmlGenericControl to represent that div in your code behind. All HTML controls derive from System.Web.UI.HtmlControl

WebControls are higher level abstractions - that is they aren't restricted to representing a single HTML element, for instance:

<asp:TreeView id="myTree" runat="server" .... />

... will render a whole mess of HTML. All the web controls provide conistent properties (like BackColor) that will map into the HTML the control generates. All the web controls derive from a System.Web.UI.WebControls.WebControl class.

 Hope that helps,


Scott
http://www.OdeToCode.com/blogs/scott/
0
bitmask
5/26/2007 4:41:19 AM
Reply:

Similar Artilces:

HTML Server Controls V/s. Web Server Controls?
How does one understand when to use HTML Server Controls & when to use Web Server Controls in a Web Form? In other words, when should HTML Server Controls be used & when should Web Server Controls be used in a Web Form?ThanksRON*********If you have an apple & I have an apple & we exchange our apples, then each of us will still have only 1 apple but if you have an idea & I have an idea & we exchange our ideas, then each of us will have 2 ideas Web Server Controls should always be used. HTML Server controls were meant so that a standard HTML page could ...

Web Form Server Controls Vs. HTML controls
Hi1. What is the difference between Web Form Server controls and HTML controls with runat="server" attribute.e.g. <input type="text" id="mytext" runat="server"> Vs. <asp:TextBox id="mytext" />2. Why we should not use the normal HTML control instead of Server Controls since HTML controls are rendered on client side the performance in using them will be much better that using Web form server controls. Pls. can somebody explain this.- Anand one thing i know. there are much more options for the web controls. and web controls are easier to use than the http controls. for exampl...

html server controls and web server controls
hello what is the difference between html server controls and web server controls? what is the main goal of converting html elements to html server controls , so why i can directly use the web server controls instead of converting process? thank you for the help and for the time If you convert a normal html control to a html server control then you can work with and reference it programmatically. MS advises using web controls where possible. But if your application uses vast amounts of html controls its far easier to just apply runat="server" than to re invent them a...

HTML Server Control or Web Server Control?
Hi, Being new to ASP.NET I have one thing confusing me much. 1. Whats the major difference between HTML Server Control and Web Server Control? 2. Whats the advantage of processing all the HTML Controls in Server? Server will not be overloaded with this? Which one should I use?..Plain HTML or HTML Server Control or Web Server Control? Thanks and Regards _________________ ASP 2 ASP.NET FYI: http://msdn.microsoft.com/msdnmag/issues/01/09/asp/toc.asp Colt Hi Colt, Thanks for the link. I personally prefer server controls - - there are so many more possi...

Web Server Control Containing another Web Server Control?
I'm building a web server control that needs to include functionality from 3rd party web server control, ASPNetMenu. My web server control needs to render ASPNetMenu at runtime to create a menu. I'd like to do this so that my control's parent ASPX page does not need to register ASPNetMenu or make any configuration changes as this should be done through my web server control. Does anybody have any suggestions on how to do this? Mike - Cache entire web sites at the client and server and keep cache current. Cache just got easier! There are two articles that you would want to be int...

Difference between Web Server control and HTML Server control
 HI, I want to know what is the main difference between html server control and web server controls.Thanks in advanceVikram Vikram www.vikramlakhotia.comPlease mark the answer if it helped you  The difference is that html server controls have syntax and rendering closely mapped to html objects.  Where as web server controls have more relation to the .NET Framework. Web server controls have a richer and wider range of special purpose controls.  Calenders, tree views, etc.. If a post helps you please mark it as an answer.  Is that the only difference...

Controlling web control instances on Web Form
I have created a composite control, extending functionality of the Hidden Control. However, I would like to prevent the user from adding this control to the page multiple times. I only want one instance of the control on the Web Form. What setting in my project to I adjust to enable this functionality? I can not find it in any of the books that I have referenced. Is this a setting or is this code that has to be added to the inheriting class. Looks like there is no standard apporach. But I'd consider using static field to count number of created objects and throw exception if second object ...

web web web
Name: bahadir Email: sensiz_olmuyor_t1_at_hotmail.com Product: Firefox 2 Beta 2 Summary: web web web Comments: web sayfası yapmak Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.8.1b2) Gecko/20060821 Firefox/2.0b2 ...

Access Web Control's property within the Web Form
Hello, I have a Web Control which has a TextBox and a Button. I want to put this Control on a WebForm, then put some text in a Control's TextBox, press on Control's Button and be able to access text box's value from within the Web Form. That's my Control: _________________________________________________ public class Colo : System.Web.UI.UserControl { protected System.Web.UI.WebControls.TextBox TextBox1; protected System.Web.UI.WebControls.Button Button1; public string Myval{ get{return (string)ViewState["myval"];} set{ViewState["myval"] = va...

Server Web User Control or Web Custom Control
Ok, I made a DataGrid I like, stuck it in a Web Control Lib, and then to my toolbar. Now I want to take my nice little control and add it to a greater control, maybe place some buttons around it etc. I could always inherit from it in a new custom control and dynamically add the buttons, but I thought about using a Web User Control. I thought I could easily create a Web User Control, drop on my grid and the buttons on a form, and expose some properties and events, but once I got into it, I got a feeling that this isn't what a Web User Control is for. When designing a control li...

How to access a control on a web form from anoter web form
hi all I have this scenarios i have two web forms, one called form1 and the other called form2 form1 has a label with id "lbl1" is it possible to access lbl1 from form2, change its text permenantly? thanks.   refer: http://dotnetslackers.com/Community/blogs/haissam/archive/2007/11/26/ways-to-pass-data-between-webforms.aspxSSNPlease remember to click "Mark as Answer" on the post that helps you. MinaSamy: hi all I have this scenarios i have two web forms, one called form1 and the other called form2 form1 has a label with id "lbl1" is it p...

HTML server control and web controls
I would like to know when to use HTML controls with runat=server and web controls? and what is the difference between these two thanksfeed the creative machine The biggeest difference is that you can access a control's properties in the code-behind if it contains 'runat=server'...If you have a label control that you will not need to change in any way, use the HTML control - if you will be changing the text of the label, you can add 'runat=server' to the HTML control or use the label server control... Just remember - to change the text of a label server control, you would co...

HTML Controls or Web Server Controls?
there are  2 different categories of controls in asp.net2.0, the HTML controls and WebServer controls, what are the differences in terms of usage? or in what circumstances each of these 2 categories should be used?Achievement provides the only real pleasure in life The HTML controls are primarily used when porting old ASP applications (or plain HTML) pages to ASP.NET. They are also sometimes used when you want to write large amounts of client-side JavaScript. The ASP.NET server-side controls are used when you want to write server-side code to get/set the values of the controls (but ...

What's the Diff between Web Form and Server Control?
I'm confused in my transition from ASP to .NET. We've got the HtmlSelect Control (a Server Control) and we've got ASP:DropDownList Control (a Web Form Control). Waaaaahhhh???? Quick, explain why we have two and when to use them, before my head explodes!!!! Basically, you are talking about the same thing, and just using different terms. Sorta like comparing an active-x control to a COM object - it's the same thing. Anyway, in the case above, there are times (most of the time) when you will use Microsofts "web form controls", which are like your standard HTML controls...

Web resources about - Html V/S Web Server Controls - asp.net.web-forms

Control - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Continental Automotive recalls 5 million airbag control units
Filed under: Recalls , Chrysler , Fiat , Honda , Mercedes-Benz , Safety , Crossover , Minivan/Van , Sedan Only 580,000 Continental airbag-equipped ...

Zika Control Demands Anti-Mosquito Measures, Officials Say
Governments and residents of areas where Zika virus is spreading should redouble their efforts to limit exposure to mosquitoes that carry the ...

Sessa Capital Files Lawsuit against Ashford Hospitality Prime over Change in Control Provision
Sessa Capital (Master), L.P. (&ldquo;Sessa&rdquo;), owner of 8.2% of the outstanding common shares of Ashford Hospitality Prime, Inc. (NYSE:AHP) ...

Study: Texas birth control fell after Planned Parenthood cut
Fewer women obtained long-acting birth control, births increased in poor families after state dropped Planned Parenthood from health program ...

Zika tests Catholic position on birth control
Zika-infected mosquitoes aren't just causing medical problems, they're creating a theological conundrum for the Catholic church

Box helps businesses better control encryption of cloud data
Box has made it easier for its customers to control how stored data is encrypted with an update announced Thursday . The company announced a ...

Panel: Takata Lacks Quality Control Processes, Policies For Addressing Defects
An independent review panel hired by Takata — the company behind the ongoing recall of millions of defective, potentially dangerous, airbags ...

Air Traffic Control: Ripe For Reform
The Canadians are right — it’s time to privatize our air traffic control system.

Study finds Texas birth control use fell after GOP lawmakers hacked Planned Parenthood funding
... lo and behold, an independent study by the New England Journal of Medicine has found that resulted in fewer women using long-acting birth control. ...

Resources last updated: 2/5/2016 7:30:20 AM