Pages

Web hosting

Monday, 24 March 2014

Asp.Net Basic Controls - Button

Button Control:

ASP .Net provides three types of button controls: buttons, link buttons and image buttons. As the names suggest a button displays text within a rectangular area, a link button displays text that looks like a hyperlink. And an Image Button displays an image.


 ASP Code:
                   <asp:Button ID="Button1" runat="server" Text="Button" />

Property:
Property Description
Text The text displayed by the button. This is for button and link button controls only.
Height Set height of button in px
Width Set width of button in px
PostBackUrl Set Page name on which go after button click
OnClientClick Set your own function which active on button click
Events:
Events Description
Click Button_click event generate on code page. This part use for coding
Command Button_Command event generate on code page. This part use for Database command

Other Control :

Label TextBox Button HyperLink
CheckBox CheckBoxList RadioButton RadioButtonList
Image ImageButton ImageMap Calender
DropDownList ListBox FileUpload

Sunday, 23 March 2014

Asp.Net Basic Controls - TextBox

TextBox Control:

  • Text box controls are typically used to accept input from the user. A text box control can accept one or more lines to text depending upon the setting of the TextMode attribute.

Asp Code:
        <asp:TextBox ID="txtstate" runat="server" ></asp:TextBox>
Property:
Property Description
Height Set height of label in px
Width Set width of label in px
TextMode SingleLine :
MultiLine :
Password :
ForeColor Set font color as your need
Font Set font style and attribute
BackColor Set label back ground color

Other Control :

Label TextBox Button HyperLink
CheckBox CheckBoxList RadioButton RadioButtonList
Image ImageButton ImageMap Calender
DropDownList ListBox FileUpload

Friday, 21 March 2014

Asp.Net Basic Controls - Label

Label Control:

  • Label controls provide an easy way to display text which can be changed from one execution of a page to the next. If you want to display a text that does not change, you use the literal text.

Asp code:
               <asp:Label ID="Label1" runat="server" Text="Your Name :"></asp:Label>
Property:
Property Description
Text Set Label text to display
Height Set height of label in px
Width Set width of label in px
ForeColor Set font color as your need
Font Set font style and attribute
BackColor Set label back ground color

Other Control :

Label TextBox Button HyperLink
CheckBox CheckBoxList RadioButton RadioButtonList
Image ImageButton ImageMap Calender
DropDownList ListBox FileUpload