Click here to hide categories Click here to show left categories

User: Home          welcome : Guest          Log In / Register here     




Introduction to controls

												(1) Label
										
												
														
																In .Net
														
												
												
														
																
<
asp : Label ID ="Label1" runat ="server" Text ="Its My Label"></ asp : Label

In HTML

<span id="Label1">Its My Label</span>
												
														(2) DropDownList
														
														
												
										
												
														
																In .Net 
< asp : DropDownList
ID ="DropDownList1" runat ="server"></ asp : DropDownList >
In HTML

<select name="DropDownList1" id="DropDownList1">
Note: Post back not work when Javascript is OFF
												(3)
Link Button
												
														 
												
										

In .Net
< asp : LinkButton ID ="LinkButton1" runat ="server" onclick ="LinkButton1_Click">LinkButton</asp:LinkButton>

												
														
																In HTML
														
												
												
<a id="LinkButton1" href="javascript:__doPostBack('LinkButton1','')">LinkButton</a>
Note: Post back not work when Javascript is OFF
												
														(4) HyperLink
														
														
												
										
												
														
																In .Net 
< asp : HyperLink ID ="HyperLink1" runat ="server" NavigateUrl ="~/bullet_icon.gif">HyperLink</asp:HyperLink>

In HTML
<a id="HyperLink1" href="
bullet_icon.gif ">HyperLink</a>
Note: Post back works when Javascript is OFF
												(5) 
Image button
												
														
																 
														
												
										
												
														
																In .Net 
< asp : ImageButton ID ="ImageButton1" runat ="server" />
												
														
																In HTML
														
												
												
<input type="image" name="ImageButton1" id="ImageButton1" src="" style="border-width:0px;" />
Note:
Post back works when Javascript is OFF
												
														(6) 
List box

In .Net
< asp : ListBox ID ="ListBox1" runat ="server" AutoPostBack ="true"

												
														onselectedindexchanged
														="ListBox1_SelectedIndexChanged" ></
														asp
														:
														ListBox
														>
														
In HTML
<select size="4" name="ListBox1" id="ListBox1">

Note: Post back not work when Javascript is OFF
												(7)
Check box
												
														
																 
														
												
										
												
														
																In .Net
<asp:CheckBoxID="CheckBox1" runat="server" />
In HTML

<input id="CheckBox1" type="checkbox" name="CheckBox1" />
Note: Post back not work when Javascript is OFF

												
														
																 
														
												
										
												
														(8)
Button
												
														
																 
														
												
										
												
														
																In .Net
														
												
												
														
																
<
asp : Button
ID ="Button1" runat ="server" Text ="Button" />

In HTML

<input type="submit" name="Button1" value="Button" id="Button1" />
												
														
														
												
												
														Note: Post back works when Javascript is OFF
										
												
												
										
												
														
																 
														
												
										

Share this article   |    Print    |    Article read by 839 times
Author:
Rohit kakria
I am software developer, moderator of xpode.com
Related Articles:
Related Interview Questions: