Chapter - 3 ASP - Net Controls
Chapter - 3 ASP - Net Controls
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