0% found this document useful (0 votes)
97 views

Chapter - 3 ASP - Net Controls

This document discusses HTML server controls in ASP.net. HTML server controls allow normal HTML elements to be used while still having server-side functionality. They are defined in the System.Web.UI.HtmlControls namespace and must include a runat="server" attribute to function on the server. Examples of common HTML server controls are the anchor, button, form, image, checkbox, and radio button elements. The document also provides an example of using a server-side anchor element and modifying its href property from the code-behind page.

Uploaded by

kashyapp_47
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
97 views

Chapter - 3 ASP - Net Controls

This document discusses HTML server controls in ASP.net. HTML server controls allow normal HTML elements to be used while still having server-side functionality. They are defined in the System.Web.UI.HtmlControls namespace and must include a runat="server" attribute to function on the server. Examples of common HTML server controls are the anchor, button, form, image, checkbox, and radio button elements. The document also provides an example of using a server-side anchor element and modifying its href property from the code-behind page.

Uploaded by

kashyapp_47
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Chapter -3- ASP.

net Controls
3.1 - HTML SERVER CONTROLS :
- Html server controls are run at server side.
- These controls are defined in namespace , System.web.UI.HTML Controls
- We can use normal HTML control but it will run at client side only.
- Html server controls have an attribute of runat = server
- We can declare html server control same as static html tags.
- This controls must be in <form> tag with runat=server attribute.

ADVANTAGES :
- They have ability to handle events in client scripts
- These control support validation controls
- These control also support CSS
- These controls are automatically maintained.

DISADVANTAGES :
- For different browser we will required different code

EXAMPLE OF HTML CONTROLS :
i.> HTML Anchor : <a> element is use to create a link to another page.
ii.> HTML Button : use to create a server side button
iii.> HTML Form : Creates <form> element.
iv.> HTML Image : use to put image in web page.
v.> HTML InputCheckBox : use to put check box in web page.
vi.> HTML Inputradiobutton : to put radio buttion in web page.
vii.> HTML Table : to put table in web page.




EXAMPLE OF HTML SERVER CONTROLS :



<script runat = server>
Sub page_load
Link1.href = www.google.com
</ script>
<html>
<body>
<form runat = server>
<a id= link1 runat = server> VISTI GTU </a>
</form>
<body>
</html>





VISIT GOOGLE

You might also like