SlideShare a Scribd company logo
1 of 15
UNIT -3
ASP.NET STANDARD CONTROLS
Displaying Information
 Label control.
Label Control:
The label control is used to display a static text or a message to the
user on the form.
The label control is normally used along with other controls.
Common examples is wherein a label is added along with the
textbox control.
The label gives an indication to the user on what is expected to fill
up in the textbox.
This is server side control, asp provides own tag to create label. The
example is given below.
< asp:LabelID=“lblname" runat="server" Text=“Name" ></asp:Label>
Label Control Property
Property Description
AccessKey It is used to set keyboard shortcut for the label.
BackColor It is used to set background color of the label.
BorderColor It is used to set border color of the label.
BorderWidth It is used to set width of border of the label.
Font It is used to set font for the label text.
ForeColor It is used to set color of the label text.
Text It is used to set text to be shown for the label.
ToolTip It displays the text when mouse is over the label.
Visible To set visibility of label on the form.
Height It is used to set height of the label.
Width It is used to set width of the label.
Accepting User Information
 Textbox Control.
Checkbox Control.
Radiobutton Control
Button Control
Link Button Control
Image Button Control
Image map Control
Textbox Control:
Textbox control is most usable web server control in asp.net.
TextBox control is a rectangular box which is used to take user to input.
In simple word the TextBox is a place where user can input some text on
asp.net web form.
To use TextBox on page we can write code or just drag and drop from toolbox.
A text box control can accept one or more lines of text depending upon the
settings of the TextMode attribute.
< asp:LabelID=“lblname" runat="server" Text=“Name" ></asp:Label>
< asp:TextBoxID=“txtname" runat="server" ></asp:TextBox>
Textbox Control Property
Property Description
ID Identification name of textbox control.
Text It is used to display text in a textbox.
BackColor It is used to set background color of textbox control.
ForColor It is used to set text color of the textbox.
ToolTip It displays a text on control when mouse over on it.
CssClass It is used to apply style on textbox.
Enable true/false – used to enable or disable textbox.
TextMode Single / Multiline / Password
CausesValidation true/false – It is used to enable or disable validation effect on textbox
Visible true/false – It is used to hide or visible textbox on web page.
ReadOnly true/false – used to enable or disable textbox readonly.
MaxLenght It is used to set maximum number of characters that can be input in TextBox.
CheckBox Control:
• CheckBox control is an asp.net web server control.
• It is used to get multiple inputs from the user.
• It allows user to select choices from the set of choices.
• It takes user input in yes or no format. It is useful when we want multiple
choices from the user.
• To create CheckBox we can drag it from the toolbox in visual studio.
• CheckBox control visually as square on web forms. The Checkbox control
allow user to check square or uncheck square.
• In CheckBox control check and uncheck checkbox specify by the checked
property of check box true or false.
• If checkbox control square ticked then checked = true and unchecked then
checked=false.
• Checkbox control allow user to do either checked(tick) or unchecked (untick)
the checkbox control in asp.net.
• <asp:CheckBox ID="Chkred" runat="server" Text="RED" />
CheckBox Control Property
Property Description
AccessKey It is used to set keyboard shortcut for the checkbox.
BackColor It is used to set background color of the checkbox.
BorderColor It is used to set border color of the checkbox.
BorderWidth It is used to set width of border of the checkbox
Font It is used to set font for the checkbox text.
ForeColor It is used to set color of the checkbox text.
Text It is used to set text to be shown for the checkbox.
ToolTip It displays the text when mouse is over the checkbox.
Visible To set visibility of checkbox on the form.
Height It is used to set height of the checkbox.
Width It is used to set width of the checkbox.
Checked It is used to set check state of the checkbox either true or false.
RadioButton Control:
It is an input control which is used to takes input from the user.
To create RadioButton we can drag it from the toolbox of visual studio.
This is a server side control and ASP.NET provides own tag to create it.
Radiobutton is used to allow user to select a single radiobutton from group of
radiobutton.
A Radio button is used to showcase a list of items.
< asp:RadioButtonID="Rdomale" runat="server" Text="Male" GroupName="g
ender"/>
< asp:RadioButtonID="Rdofemale" runat="server" Text=“Female" GroupName
="gender"/>
Radiobutton Control Property
Property Description
AccessKey It is used to set keyboard shortcut for the Radiobutton.
BackColor It is used to set background color of the Radiobutton.
BorderColor It is used to set border color of the Radiobutton.
BorderWidth It is used to set width of border of the Radiobutton.
Font It is used to set font for the Radiobutton text.
ForeColor It is used to set color of the Radiobutton text.
Text It is used to set text to be shown for the Radiobutton.
ToolTip It displays the text when mouse is over the Radiobutton.
Visible To set visibility of Radiobutton on the form.
Height It is used to set height of the Radiobutton.
Width It is used to set width of the Radiobutton.
Checked It is used to set check state of the Radiobutton either true or false.
GroupName It is used to set name of the radio button group.
ButtonControl:
 Displays a push button control on the Web page.
 The Push button can be a command button or a submit button.
 A command button has a command name and permits us to create multiple buttons on a page.
When a command button is clicked, we can also implement an event handler to control the actions to be
performed.
 A Submit button does not have a command name and when the button is clicked, it posts the web
page back to the server.
 When a submit button is clicked, we can also implement an event handler to control the actions to
be performed.
Some of the important properties of a button control are:
CausesValidation: This indicates whether validation will be performed when this button will be clicked. Here,
the Value can be set as true or false.
PostBackUrl: This specifies the URL of the page to post to from the current page when a button is clicked.
ValidationGroup: It enables you to specify which validators on the page are called when the button is
clicked. If no validation groups are established, a button click calls all of the validators that are on the page.
OnClientClick: Attach a client side (JavaScript) event that will fire when this button will be clicked.
OnClick: Raises the Click event of the Button control.
<asp:Button ID="Button1" runat="server" onclick="Button1_Click"
style="z-index: 1; left: 23px; top: 56px; position: absolute" Text="click!" />
LinkButtonControl
 The LinkButton control is used to create a hyperlink-style button on the Web page.
 This control looks like a Hyperlink control but almost has the functionality of the Button
control.
 Despite being a hyperlink, you can't specify the target URL.
 There is no UserSubmitBehavior property like the Button control with this control.
Some of the important properties of LinkButton Control are:
CausesValidation: This indicates whether validation will be performed when this button will be
clicked. Here, the Value can be set as true or false.
PostBackUrl: This Specifies the URL of the page to post to from the current page when the
LinkButton control is clicked.
ValidationGroup: The group of controls for which the LinkButton control causes validation when it
posts back to the server.
OnClick: Attach a server side method that will fire when this button will be clicked.
OnClientClick: Attach a client side (JavaScript) method that will fire when this button will be
clicked.
<asp:LinkButton ID="LinkButton1" runat="server" EnableTheming="True"
onclick="LinkButton1_Click"
style="z-index: 1; left: 24px; top: 194px; position: absolute"
ToolTip="Link to another page">LinkButton</asp:LinkButton>
ImageButton
Its like an ASP Button control, the only difference is, you have the ability to place your own image
as a button.
 use an image Button when you want your button to look different than the plain
rectangular button.
 Any image can be a button!.
 Some of the important properties of an ImageButton Control are:
ImageUrl: Gets or Sets the location of the image to display as button control.
CausesValidation: This indicates whether validation will be performed when this button will be
clicked. Here, the Value can be set as true or false.
PostBackUrl: This Specifies the URL of the page to post to from the current page when the
LinkButton control is clicked.
OnClick: Attach a server side method that will fire when this button will be clicked.
OnClientClick: Attach a client side (JavaScript) method that will fire when this button will be
clicked.
<asp:ImageButton ID="ImageButton1" runat="server"
ImageUrl="~/images/smiley-guy.jpg" onclick="ImageButton1_Click"
style="z-index: 1; left: 16px; top: 294px; position: absolute; height: 80px;
width: 88px; right: 1177px; bottom: 421px" />
ImageMap control
The ImageMap control in ASP.NET 2.0 and onward versions can be used to create an image that
contains defined hot spot regions. When a user clicks a hot spot region, the control can either
generate a post back to the server or navigate to a specified URL.
There are three kinds of hot spot regions defined in ImageMap control.
• RectangleHotSpot
• CircleHotSpot
• PolygonHotSpot
• The RectangleHotSpot defines rectangular hot spot regions.
• The CircleHotSpotdefines circle-shaped ones
• The PolygonHotSpot is used for irregularly shaped hot spot area.
<asp:ImageMap ID="india" runat="server" ImageUrl="~/Map.jpg" Height="500px" Width="887px" HotSpotMode="PostBack" OnClick="india_C
lick" BackColor="#C0C000" BorderColor="DarkSlateGray" ForeColor="Red">
• <asp:CircleHotSpot Radius="7" X="215" Y="125" HotSpotMode="PostBack" NavigateUrl="~/map.aspx" PostBackValue="b
huj" AlternateText="Bhuj" />
• <asp:CircleHotSpot Radius="7" X="525" Y="95" HotSpotMode="PostBack" NavigateUrl="~/map.aspx" PostBackValue="pat
an" />
• <asp:CircleHotSpot Radius="7" X="565" Y="45" HotSpotMode="PostBack" NavigateUrl="~/map.aspx" PostBackValue="am
baji" />
• <asp:CircleHotSpot Radius="7" X="525" Y="150" HotSpotMode="PostBack" NavigateUrl="~/map.aspx" PostBackValue="m
e" />
• <asp:CircleHotSpot Radius="7" X="625" Y="120" HotSpotMode="PostBack" NavigateUrl="~/map.aspx" PostBackValue="hi

More Related Content

Similar to ASP.NET UNIT 3.ppt (20)

Unit2
Unit2Unit2
Unit2
 
Web Server Controls VB Set 1
Web Server Controls VB Set 1Web Server Controls VB Set 1
Web Server Controls VB Set 1
 
WPF Controls
WPF ControlsWPF Controls
WPF Controls
 
LAYERS asp.net ppt
LAYERS asp.net pptLAYERS asp.net ppt
LAYERS asp.net ppt
 
Html Form Controls
Html Form ControlsHtml Form Controls
Html Form Controls
 
Radio button
Radio buttonRadio button
Radio button
 
Toolbar
ToolbarToolbar
Toolbar
 
ASP.NET 03 - Working With Web Server Controls
ASP.NET 03 - Working With Web Server ControlsASP.NET 03 - Working With Web Server Controls
ASP.NET 03 - Working With Web Server Controls
 
Windowforms controls c#
Windowforms controls c#Windowforms controls c#
Windowforms controls c#
 
Html Tutorial
Html TutorialHtml Tutorial
Html Tutorial
 
Vs c# lecture1
Vs c# lecture1Vs c# lecture1
Vs c# lecture1
 
CheckBox In C#.pptx
CheckBox In C#.pptxCheckBox In C#.pptx
CheckBox In C#.pptx
 
java
javajava
java
 
Basic controls in asp
Basic controls in aspBasic controls in asp
Basic controls in asp
 
Html forms
Html formsHtml forms
Html forms
 
Vb
VbVb
Vb
 
05.Blend Expression, Transformation & Animation
05.Blend Expression, Transformation & Animation05.Blend Expression, Transformation & Animation
05.Blend Expression, Transformation & Animation
 
Ajax control tool kit
Ajax control tool kitAjax control tool kit
Ajax control tool kit
 
Font dialog &amp; link label
Font dialog &amp; link labelFont dialog &amp; link label
Font dialog &amp; link label
 
Combo box and List box in VB.Net.ppt
Combo box and List box in VB.Net.pptCombo box and List box in VB.Net.ppt
Combo box and List box in VB.Net.ppt
 

Recently uploaded

如何办理(UB毕业证书)纽约州立大学水牛城分校毕业证成绩单本科硕士学位证留信学历认证
如何办理(UB毕业证书)纽约州立大学水牛城分校毕业证成绩单本科硕士学位证留信学历认证如何办理(UB毕业证书)纽约州立大学水牛城分校毕业证成绩单本科硕士学位证留信学历认证
如何办理(UB毕业证书)纽约州立大学水牛城分校毕业证成绩单本科硕士学位证留信学历认证ugzga
 
In Saudi Arabia Jeddah (+918761049707)) Buy Abortion Pills For Sale in Riyadh
In Saudi Arabia Jeddah (+918761049707)) Buy Abortion Pills For Sale in RiyadhIn Saudi Arabia Jeddah (+918761049707)) Buy Abortion Pills For Sale in Riyadh
In Saudi Arabia Jeddah (+918761049707)) Buy Abortion Pills For Sale in Riyadhahmedjiabur940
 
如何办理(UMN毕业证书)明尼苏达大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UMN毕业证书)明尼苏达大学毕业证成绩单本科硕士学位证留信学历认证如何办理(UMN毕业证书)明尼苏达大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UMN毕业证书)明尼苏达大学毕业证成绩单本科硕士学位证留信学历认证ugzga
 
如何办理(Bath毕业证书)巴斯大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(Bath毕业证书)巴斯大学毕业证成绩单本科硕士学位证留信学历认证如何办理(Bath毕业证书)巴斯大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(Bath毕业证书)巴斯大学毕业证成绩单本科硕士学位证留信学历认证ugzga
 
Software Architecture - Architecture Styles and Patterns-1.pdf
Software Architecture - Architecture Styles and Patterns-1.pdfSoftware Architecture - Architecture Styles and Patterns-1.pdf
Software Architecture - Architecture Styles and Patterns-1.pdfjordantsagmo
 
Gamestore case study UI UX by Amgad Ibrahim
Gamestore case study UI UX by Amgad IbrahimGamestore case study UI UX by Amgad Ibrahim
Gamestore case study UI UX by Amgad Ibrahimamgadibrahim92
 
How to Build a Simple Shopify Website
How to Build a Simple Shopify WebsiteHow to Build a Simple Shopify Website
How to Build a Simple Shopify Websitemark11275
 
Morgenbooster: Storytelling in Identity Design
Morgenbooster: Storytelling in Identity DesignMorgenbooster: Storytelling in Identity Design
Morgenbooster: Storytelling in Identity Design1508 A/S
 
Edward Boginsky's Trailblazing Contributions to Printing
Edward Boginsky's Trailblazing Contributions to PrintingEdward Boginsky's Trailblazing Contributions to Printing
Edward Boginsky's Trailblazing Contributions to PrintingEdward Boginsky
 
如何办理(UoB毕业证书)伯明翰大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UoB毕业证书)伯明翰大学毕业证成绩单本科硕士学位证留信学历认证如何办理(UoB毕业证书)伯明翰大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UoB毕业证书)伯明翰大学毕业证成绩单本科硕士学位证留信学历认证ugzga
 
TRose UXPA Experience Design Concord .pptx
TRose UXPA Experience Design Concord .pptxTRose UXPA Experience Design Concord .pptx
TRose UXPA Experience Design Concord .pptxtrose8
 
挂科办理天主教大学毕业证成绩单一模一样品质
挂科办理天主教大学毕业证成绩单一模一样品质挂科办理天主教大学毕业证成绩单一模一样品质
挂科办理天主教大学毕业证成绩单一模一样品质yzeoq
 
Academic Portfolio (2017-2021) .pdf
Academic Portfolio (2017-2021)      .pdfAcademic Portfolio (2017-2021)      .pdf
Academic Portfolio (2017-2021) .pdfM. A. Architects
 
Abortion pills in Kuwait 🚚+966505195917 but home delivery available in Kuwait...
Abortion pills in Kuwait 🚚+966505195917 but home delivery available in Kuwait...Abortion pills in Kuwait 🚚+966505195917 but home delivery available in Kuwait...
Abortion pills in Kuwait 🚚+966505195917 but home delivery available in Kuwait...drmarathore
 
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...samsungultra782445
 
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样awasv46j
 
Design-System - FinTech - Isadora Agency
Design-System - FinTech - Isadora AgencyDesign-System - FinTech - Isadora Agency
Design-System - FinTech - Isadora AgencyIsadora Agency
 
如何办理(RUG毕业证书)格罗宁根大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(RUG毕业证书)格罗宁根大学毕业证成绩单本科硕士学位证留信学历认证如何办理(RUG毕业证书)格罗宁根大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(RUG毕业证书)格罗宁根大学毕业证成绩单本科硕士学位证留信学历认证ugzga
 
Essential UI/UX Design Principles: A Comprehensive Guide
Essential UI/UX Design Principles: A Comprehensive GuideEssential UI/UX Design Principles: A Comprehensive Guide
Essential UI/UX Design Principles: A Comprehensive GuideDesign Studio UI UX
 
ECHOES OF GENIUS - A Tribute to Nari Gandhi's Architectural Legacy. .pdf
ECHOES OF GENIUS - A Tribute to Nari Gandhi's Architectural Legacy. .pdfECHOES OF GENIUS - A Tribute to Nari Gandhi's Architectural Legacy. .pdf
ECHOES OF GENIUS - A Tribute to Nari Gandhi's Architectural Legacy. .pdfSarbjit Bahga
 

Recently uploaded (20)

如何办理(UB毕业证书)纽约州立大学水牛城分校毕业证成绩单本科硕士学位证留信学历认证
如何办理(UB毕业证书)纽约州立大学水牛城分校毕业证成绩单本科硕士学位证留信学历认证如何办理(UB毕业证书)纽约州立大学水牛城分校毕业证成绩单本科硕士学位证留信学历认证
如何办理(UB毕业证书)纽约州立大学水牛城分校毕业证成绩单本科硕士学位证留信学历认证
 
In Saudi Arabia Jeddah (+918761049707)) Buy Abortion Pills For Sale in Riyadh
In Saudi Arabia Jeddah (+918761049707)) Buy Abortion Pills For Sale in RiyadhIn Saudi Arabia Jeddah (+918761049707)) Buy Abortion Pills For Sale in Riyadh
In Saudi Arabia Jeddah (+918761049707)) Buy Abortion Pills For Sale in Riyadh
 
如何办理(UMN毕业证书)明尼苏达大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UMN毕业证书)明尼苏达大学毕业证成绩单本科硕士学位证留信学历认证如何办理(UMN毕业证书)明尼苏达大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UMN毕业证书)明尼苏达大学毕业证成绩单本科硕士学位证留信学历认证
 
如何办理(Bath毕业证书)巴斯大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(Bath毕业证书)巴斯大学毕业证成绩单本科硕士学位证留信学历认证如何办理(Bath毕业证书)巴斯大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(Bath毕业证书)巴斯大学毕业证成绩单本科硕士学位证留信学历认证
 
Software Architecture - Architecture Styles and Patterns-1.pdf
Software Architecture - Architecture Styles and Patterns-1.pdfSoftware Architecture - Architecture Styles and Patterns-1.pdf
Software Architecture - Architecture Styles and Patterns-1.pdf
 
Gamestore case study UI UX by Amgad Ibrahim
Gamestore case study UI UX by Amgad IbrahimGamestore case study UI UX by Amgad Ibrahim
Gamestore case study UI UX by Amgad Ibrahim
 
How to Build a Simple Shopify Website
How to Build a Simple Shopify WebsiteHow to Build a Simple Shopify Website
How to Build a Simple Shopify Website
 
Morgenbooster: Storytelling in Identity Design
Morgenbooster: Storytelling in Identity DesignMorgenbooster: Storytelling in Identity Design
Morgenbooster: Storytelling in Identity Design
 
Edward Boginsky's Trailblazing Contributions to Printing
Edward Boginsky's Trailblazing Contributions to PrintingEdward Boginsky's Trailblazing Contributions to Printing
Edward Boginsky's Trailblazing Contributions to Printing
 
如何办理(UoB毕业证书)伯明翰大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UoB毕业证书)伯明翰大学毕业证成绩单本科硕士学位证留信学历认证如何办理(UoB毕业证书)伯明翰大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UoB毕业证书)伯明翰大学毕业证成绩单本科硕士学位证留信学历认证
 
TRose UXPA Experience Design Concord .pptx
TRose UXPA Experience Design Concord .pptxTRose UXPA Experience Design Concord .pptx
TRose UXPA Experience Design Concord .pptx
 
挂科办理天主教大学毕业证成绩单一模一样品质
挂科办理天主教大学毕业证成绩单一模一样品质挂科办理天主教大学毕业证成绩单一模一样品质
挂科办理天主教大学毕业证成绩单一模一样品质
 
Academic Portfolio (2017-2021) .pdf
Academic Portfolio (2017-2021)      .pdfAcademic Portfolio (2017-2021)      .pdf
Academic Portfolio (2017-2021) .pdf
 
Abortion pills in Kuwait 🚚+966505195917 but home delivery available in Kuwait...
Abortion pills in Kuwait 🚚+966505195917 but home delivery available in Kuwait...Abortion pills in Kuwait 🚚+966505195917 but home delivery available in Kuwait...
Abortion pills in Kuwait 🚚+966505195917 but home delivery available in Kuwait...
 
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...
 
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样
 
Design-System - FinTech - Isadora Agency
Design-System - FinTech - Isadora AgencyDesign-System - FinTech - Isadora Agency
Design-System - FinTech - Isadora Agency
 
如何办理(RUG毕业证书)格罗宁根大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(RUG毕业证书)格罗宁根大学毕业证成绩单本科硕士学位证留信学历认证如何办理(RUG毕业证书)格罗宁根大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(RUG毕业证书)格罗宁根大学毕业证成绩单本科硕士学位证留信学历认证
 
Essential UI/UX Design Principles: A Comprehensive Guide
Essential UI/UX Design Principles: A Comprehensive GuideEssential UI/UX Design Principles: A Comprehensive Guide
Essential UI/UX Design Principles: A Comprehensive Guide
 
ECHOES OF GENIUS - A Tribute to Nari Gandhi's Architectural Legacy. .pdf
ECHOES OF GENIUS - A Tribute to Nari Gandhi's Architectural Legacy. .pdfECHOES OF GENIUS - A Tribute to Nari Gandhi's Architectural Legacy. .pdf
ECHOES OF GENIUS - A Tribute to Nari Gandhi's Architectural Legacy. .pdf
 

ASP.NET UNIT 3.ppt

  • 3. Label Control: The label control is used to display a static text or a message to the user on the form. The label control is normally used along with other controls. Common examples is wherein a label is added along with the textbox control. The label gives an indication to the user on what is expected to fill up in the textbox. This is server side control, asp provides own tag to create label. The example is given below. < asp:LabelID=“lblname" runat="server" Text=“Name" ></asp:Label>
  • 4. Label Control Property Property Description AccessKey It is used to set keyboard shortcut for the label. BackColor It is used to set background color of the label. BorderColor It is used to set border color of the label. BorderWidth It is used to set width of border of the label. Font It is used to set font for the label text. ForeColor It is used to set color of the label text. Text It is used to set text to be shown for the label. ToolTip It displays the text when mouse is over the label. Visible To set visibility of label on the form. Height It is used to set height of the label. Width It is used to set width of the label.
  • 5. Accepting User Information  Textbox Control. Checkbox Control. Radiobutton Control Button Control Link Button Control Image Button Control Image map Control
  • 6. Textbox Control: Textbox control is most usable web server control in asp.net. TextBox control is a rectangular box which is used to take user to input. In simple word the TextBox is a place where user can input some text on asp.net web form. To use TextBox on page we can write code or just drag and drop from toolbox. A text box control can accept one or more lines of text depending upon the settings of the TextMode attribute. < asp:LabelID=“lblname" runat="server" Text=“Name" ></asp:Label> < asp:TextBoxID=“txtname" runat="server" ></asp:TextBox>
  • 7. Textbox Control Property Property Description ID Identification name of textbox control. Text It is used to display text in a textbox. BackColor It is used to set background color of textbox control. ForColor It is used to set text color of the textbox. ToolTip It displays a text on control when mouse over on it. CssClass It is used to apply style on textbox. Enable true/false – used to enable or disable textbox. TextMode Single / Multiline / Password CausesValidation true/false – It is used to enable or disable validation effect on textbox Visible true/false – It is used to hide or visible textbox on web page. ReadOnly true/false – used to enable or disable textbox readonly. MaxLenght It is used to set maximum number of characters that can be input in TextBox.
  • 8. CheckBox Control: • CheckBox control is an asp.net web server control. • It is used to get multiple inputs from the user. • It allows user to select choices from the set of choices. • It takes user input in yes or no format. It is useful when we want multiple choices from the user. • To create CheckBox we can drag it from the toolbox in visual studio. • CheckBox control visually as square on web forms. The Checkbox control allow user to check square or uncheck square. • In CheckBox control check and uncheck checkbox specify by the checked property of check box true or false. • If checkbox control square ticked then checked = true and unchecked then checked=false. • Checkbox control allow user to do either checked(tick) or unchecked (untick) the checkbox control in asp.net. • <asp:CheckBox ID="Chkred" runat="server" Text="RED" />
  • 9. CheckBox Control Property Property Description AccessKey It is used to set keyboard shortcut for the checkbox. BackColor It is used to set background color of the checkbox. BorderColor It is used to set border color of the checkbox. BorderWidth It is used to set width of border of the checkbox Font It is used to set font for the checkbox text. ForeColor It is used to set color of the checkbox text. Text It is used to set text to be shown for the checkbox. ToolTip It displays the text when mouse is over the checkbox. Visible To set visibility of checkbox on the form. Height It is used to set height of the checkbox. Width It is used to set width of the checkbox. Checked It is used to set check state of the checkbox either true or false.
  • 10. RadioButton Control: It is an input control which is used to takes input from the user. To create RadioButton we can drag it from the toolbox of visual studio. This is a server side control and ASP.NET provides own tag to create it. Radiobutton is used to allow user to select a single radiobutton from group of radiobutton. A Radio button is used to showcase a list of items. < asp:RadioButtonID="Rdomale" runat="server" Text="Male" GroupName="g ender"/> < asp:RadioButtonID="Rdofemale" runat="server" Text=“Female" GroupName ="gender"/>
  • 11. Radiobutton Control Property Property Description AccessKey It is used to set keyboard shortcut for the Radiobutton. BackColor It is used to set background color of the Radiobutton. BorderColor It is used to set border color of the Radiobutton. BorderWidth It is used to set width of border of the Radiobutton. Font It is used to set font for the Radiobutton text. ForeColor It is used to set color of the Radiobutton text. Text It is used to set text to be shown for the Radiobutton. ToolTip It displays the text when mouse is over the Radiobutton. Visible To set visibility of Radiobutton on the form. Height It is used to set height of the Radiobutton. Width It is used to set width of the Radiobutton. Checked It is used to set check state of the Radiobutton either true or false. GroupName It is used to set name of the radio button group.
  • 12. ButtonControl:  Displays a push button control on the Web page.  The Push button can be a command button or a submit button.  A command button has a command name and permits us to create multiple buttons on a page. When a command button is clicked, we can also implement an event handler to control the actions to be performed.  A Submit button does not have a command name and when the button is clicked, it posts the web page back to the server.  When a submit button is clicked, we can also implement an event handler to control the actions to be performed. Some of the important properties of a button control are: CausesValidation: This indicates whether validation will be performed when this button will be clicked. Here, the Value can be set as true or false. PostBackUrl: This specifies the URL of the page to post to from the current page when a button is clicked. ValidationGroup: It enables you to specify which validators on the page are called when the button is clicked. If no validation groups are established, a button click calls all of the validators that are on the page. OnClientClick: Attach a client side (JavaScript) event that will fire when this button will be clicked. OnClick: Raises the Click event of the Button control. <asp:Button ID="Button1" runat="server" onclick="Button1_Click" style="z-index: 1; left: 23px; top: 56px; position: absolute" Text="click!" />
  • 13. LinkButtonControl  The LinkButton control is used to create a hyperlink-style button on the Web page.  This control looks like a Hyperlink control but almost has the functionality of the Button control.  Despite being a hyperlink, you can't specify the target URL.  There is no UserSubmitBehavior property like the Button control with this control. Some of the important properties of LinkButton Control are: CausesValidation: This indicates whether validation will be performed when this button will be clicked. Here, the Value can be set as true or false. PostBackUrl: This Specifies the URL of the page to post to from the current page when the LinkButton control is clicked. ValidationGroup: The group of controls for which the LinkButton control causes validation when it posts back to the server. OnClick: Attach a server side method that will fire when this button will be clicked. OnClientClick: Attach a client side (JavaScript) method that will fire when this button will be clicked. <asp:LinkButton ID="LinkButton1" runat="server" EnableTheming="True" onclick="LinkButton1_Click" style="z-index: 1; left: 24px; top: 194px; position: absolute" ToolTip="Link to another page">LinkButton</asp:LinkButton>
  • 14. ImageButton Its like an ASP Button control, the only difference is, you have the ability to place your own image as a button.  use an image Button when you want your button to look different than the plain rectangular button.  Any image can be a button!.  Some of the important properties of an ImageButton Control are: ImageUrl: Gets or Sets the location of the image to display as button control. CausesValidation: This indicates whether validation will be performed when this button will be clicked. Here, the Value can be set as true or false. PostBackUrl: This Specifies the URL of the page to post to from the current page when the LinkButton control is clicked. OnClick: Attach a server side method that will fire when this button will be clicked. OnClientClick: Attach a client side (JavaScript) method that will fire when this button will be clicked. <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/images/smiley-guy.jpg" onclick="ImageButton1_Click" style="z-index: 1; left: 16px; top: 294px; position: absolute; height: 80px; width: 88px; right: 1177px; bottom: 421px" />
  • 15. ImageMap control The ImageMap control in ASP.NET 2.0 and onward versions can be used to create an image that contains defined hot spot regions. When a user clicks a hot spot region, the control can either generate a post back to the server or navigate to a specified URL. There are three kinds of hot spot regions defined in ImageMap control. • RectangleHotSpot • CircleHotSpot • PolygonHotSpot • The RectangleHotSpot defines rectangular hot spot regions. • The CircleHotSpotdefines circle-shaped ones • The PolygonHotSpot is used for irregularly shaped hot spot area. <asp:ImageMap ID="india" runat="server" ImageUrl="~/Map.jpg" Height="500px" Width="887px" HotSpotMode="PostBack" OnClick="india_C lick" BackColor="#C0C000" BorderColor="DarkSlateGray" ForeColor="Red"> • <asp:CircleHotSpot Radius="7" X="215" Y="125" HotSpotMode="PostBack" NavigateUrl="~/map.aspx" PostBackValue="b huj" AlternateText="Bhuj" /> • <asp:CircleHotSpot Radius="7" X="525" Y="95" HotSpotMode="PostBack" NavigateUrl="~/map.aspx" PostBackValue="pat an" /> • <asp:CircleHotSpot Radius="7" X="565" Y="45" HotSpotMode="PostBack" NavigateUrl="~/map.aspx" PostBackValue="am baji" /> • <asp:CircleHotSpot Radius="7" X="525" Y="150" HotSpotMode="PostBack" NavigateUrl="~/map.aspx" PostBackValue="m e" /> • <asp:CircleHotSpot Radius="7" X="625" Y="120" HotSpotMode="PostBack" NavigateUrl="~/map.aspx" PostBackValue="hi