by Jane Thomson
19. March 2011 01:04
Let us look at the second step of learning ASP.NET which is about learning HTML Server Controls. HTML Server Controls are just like HTML tags of old time with an additional attribute of “runat” which provides the functionality to run the control at server. This attribute gives ASP.NET control an advantage over the old age HTML controls, which allows the programmers to use it programmatically. i.e. If there exist <a> in a web page and it needs to be used dynamically with changing the address, the attribute runat = “server” can help to achieve this.
For almost all HTML elements, the server side HTML control exists. It’s pretty easy to create the HTML server control. It just requires applying the attribute runat=”server” in the regular HTML tag and it will create HTML controlled version for this tag. The HTML server controls have been contained inside the namespace System.Web.UI.HtmlControls. Because of the fact that the HTML server controls have been handled at the server side in the ASP.NET runtime, their properties can also be accessed somewhere else in the webpage through the programming. If you might have worked either with CSS, HTML or JavaScript, you might know how error-prone and cumbersome it can be to manipulate the inline styles and text within the HTML tags. HTML Server controls on the ASP.NET aims to resolve this issue by allowing to manipulate the data quickly with any of the NET languages.
Let us look at few control classes of HTML that uses the “runat” server attribute.
- HTMLForm
- HTMLButton
- HTMLAnchor
- HTMLImage
- HTMLInputButton
- HTMLInputImage
- HTMLTable
- HTMLInputText
- HTMLTextArea
- HTMLGenericControl
So, as described in this page, it’s really easy to use the HTML Server controls with the ASP.NET which will provide user an advantage of accessing HTML Server Controls through the programming.
For Step 3 please click here.
e8a24842-2b04-4977-b7c9-af8f7a7369eb|0|.0
Tags: