Html controls vs. Web controls

Can someone give me some examples if when it is best to use html controls over web controls and vice versa?

Thanks,
tdnxxx444
0
tdnxxx444
4/6/2004 10:52:18 PM
asp.net.getting-started 91979 articles. 4 followers. Follow

1 Replies
758 Views

Similar Articles

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

Web controls show up as <asp:class runat=server> (the "asp" may be replaced by other prefixes). They may have a corresponding HTML tag that they represent, but generally they are there to build all the HTML necessary for an idea. For example, something simple like the CheckBox web control still outputs several tags when you View Source: <span><input type=checkbox><label for>. Something like the Calendar control generates an enormous about of HTML.

An HTML control is really a direct match to an HTML tag, with the addition of 'runat=server' and usually the ID= attribute. For example, the checkbox appears as:
<input type="checkbox" runat=server id="Checkbox1" />
Most often, you will use WebControls. Usually you use HtmlControls when you write the HTML tag directly into your web form then decide that you want to access it programmatically or from a WebControl by its ID. Until you add "runat=server", the HTML is just text on the page. That "runat=server" makes the server side code be able to access an object representing that text. That object is a member of the HtmlControls classes.
--- Peter Blum
Creator of Peter's Data Entry Suite (formerly Professional Validation And More and Peter's Date Package) and Peter's Polling Package
www.PeterBlum.com
0
PLBlum
4/6/2004 11:55:33 PM
Reply:

Similar Artilces:

HTML Controls vs Web Controls
Is there a cut and dry or "best practice" answer for when to use straight HTML, the HTML controls (runat=server), or the web controls? Thanks! You could have a look here: ASP.NET Server Controls Recommendations and here, perhaps: Introduction to ASP.NET Server Controls-- Mike PopeASP.NET User EducationThis posting is provided "AS IS" with no warranties, and confers no rights. Thanks!!!...

HTML Controls vs Web Form Controls
Hi, I have a page with both controls (HTML and Web Form Controls). I am trying to use an html Calendar control and then get the date selected by the user and put into a Web form input field control. When I try to run this the HTML control cannot talk to the Web form control. Any ideas? Thanks. Can't you put some javascript in the HTML-control with which you assign the value to the ASP.NET Server control? Please post some code so I can help u. Kind Regards,ThaYoung1! Hi here is the Code. Also I added a web form text input control and an html text control and created a fu...

Web form Controls vs HTML controls
Hi, can anyone explain me the difference between Web Form Controls and HTML controls? What is their usability and disadvantages? Can i write code behind HTML controls?    Thanx in advance. Yes, you just have add "runat=server", in your HTML control. The Web Server Control, have more funtionality that the HTML controls. With Web Server Control, you can work easy with Data. Too, you have controls as AdRotator, WebCalendar and more... : http://samples.gotdotnet.com/quickstart/MCP Sergio Tarrillo Here are the Recommendations from Microsoft ....when to use 1 over the other...

HTML controls vs Web Controls #2
    Hi All,   What is the differnce between HTML controls and web controls?   Some of the things which could be done by web application, could also be   be done by Web Controls.   So, why HTML controls are being provided.   What is the use of that having two different controls web controls and HTML controls?   Regards Abdul      The main difference is the Web Server Controls are generated on the server side and turned into HTML and can be used in the code behind, the HTML controls are just static HTML markup. The S...

Using scripts with Web Controls vs. HTML Controls
When using <SELECT> I can use the onchange event to execute some javascript code at the top of my document. However, it appears that when I use <asp:dropdownlist> and the OnSelectedIndexChanged event that I have to post back to the server to execute any code.  Is it possible to have javascript code execute on the client side when my asp:dropdownlist is changed or do I have to use a <SELECT> statement to accomplish this?...

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...

Mobile Web Controls vs. Web Controls
I am using VS2003 and I have realized that Mobile Web Controls are very basic and simple. So I saw in a post the way to use Web Controls inside Mobile Web Forms. Since then, I often use Web Controls instead of Mobile Web Controls. I put the Web Control inside a Mobile DeviceSpecific and put this DeviceSpecific inside a Mobile Panel. Why the Mobile Controls are so simple?  Does it happen the same in VS2005 or 2008? And, is it right to use only Web Controls inside Mobile Web Forms? Thanks. xesteban:Why the Mobile Controls are so simple?   They are simple because they suppor...

html control and web control
Hi i am getting confused when i should use html controls and when i should use web controls. Any ideas? Cheers.I can do it! if you need any server side programability or events then user Web. If you want pure HTML then use HTML controls.... Is there anything in particular you are confused about? Here are a few things to consider:It's a tough question to answer without knowing the specifics of your application.HTML controls do not have as many features with their web server control counterparts.HTML controls could be a good idea if you were converting some existing web pages that used ...

Desktop Web Controls vs. Mobile Web Controls
Hi, after having a look at the posts in this forum about mobile issues, i still have some doubts. Hope someone can clarify this to me:VS2005 does not need MMIT (currently known as ASP .NET Mobile Controls) because it´s already included in 2.0 version, right?In VS2005, if i decide to build a web site to be accessible via a desktop browser or a mobile device, the right thing to do is use the asp .net web application template? In this case, the rendering is automatic depending on the device, correct?If i decide to create a web page to be accessible via a device browser, then, for now, i still h...

Web control in web control
Hi,There are two simple web user controls A and B, where B contains A. They just display the bunch of text boxes, so I do not need them even in tool pane. They sit in the same project next to web form.I noticed that web user control put on ASPX page does not appear in code behind, but if I create it with protected keyword and name being exactly the same as id it works fine. I can access such a web control from code behind and see the value assigned in IE. The problem is that the same routine does work for my A web control in B. When I assign the value IE, I keep getting null reference. ...

controlling an object in a web control from the page the web control is placed in
I have created a web control in vb.net that has an image button and an image. when it loads the image button is visible and the image is not. I want to be able from the page which "includes" the web control to set the image button to invisible and the image to visible. When I tried this, the main page didn't recognise the image button or the image (both < asp: objects). help would be gratefully appreciated. oh yeah, it's inline code so any code behind stuff will just confuse me ;) Some code please.-- Justin Lovell...

When to use web control and Html control
I am designing a web application in which onclick a form becomes visible containing set of text boxes and other fields. How shoud I design it. I am not able to figure out difference between web form controls and html controls. Shrinivas...

what is the difference between Html controls and web controls?
hello what is the difference between Html controls and web controls? thank you for the time and for the help The HTML control is the standard control. The Web Forms control maps back to a class on the server. so An HTML Button is an input control A Web Forms Button works more like a winforms button in that it has an onclick event that fires on the server during a postback. etc...Mike Banavige~~~~~~~~~~~~Need a site code sample in a different language? Try converting it with: http://converter.telerik.com/ html control is just an enhancement of the input type...

difference between html controls and web controls?
I get confused with the differences between the two Hi, When would you use one versus the other? Please refer to the following thread: diffrence b/w HTML Controls and Web Controls Alister...

Web resources about - Html controls vs. Web controls - asp.net.getting-started

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 ...

Firefighters battle out of control bushfire in Bullsbrook
Around 70 firefighters are battling an out of control bush-fire in Bullsbrook.

Firefighters battle out of control bushfire in Bullsbrook
Around 70 firefighters are battling an out of control bush-fire in Bullsbrook.

US Democratic candidates clash over gun control at debate
Hillary Clinton criticised over foreign policy and gun control but again confirms her position as frontrunner for the Democratic nomination. ...

Victorian fires out of control
Residents are being urged to evacuate as an out of control bushfire near the Indigo Valley in northern Victoria threatens homes. Courtesy ABC ...

Victorian bushfires: Fire crews battle to get blazes under control in hot, windy conditions
Several fires continue to burn in hot, windy conditions in Victoria, but all of the emergency warnings have been downgraded, CFA officials say. ...

Dell Issues Patch For Content Adaptive Brightness Control On The XPS 13
... issues, as all devices do. One that was very frustrating to deal with during the review was the aggressive Content Adaptive Brightness Control ...

Tencent Holdings Takes Full Control of 'League of Legends' Developer Riot Games
Breitbart News Tencent Holdings Takes Full Control of 'League of Legends' Developer Riot Games Breitbart News Riot Games, the creators of ...

China's Xi on cyberspace control
Chinese President Xi Jinping defended his country's right to censor Internet content, signaling confidence in the strategy.

Taliban forces take control of key district in Afghanistan's Helmand province
CNN Taliban forces take control of key district in Afghanistan's Helmand province CNN Kabul, Afghanistan (CNN) Taliban forces have taken almost ...

Resources last updated: 12/22/2015 10:09:09 AM