Skip to main content

Posts

Showing posts from April, 2016

Text Boxes and Labels Control in Asp.net

Text Boxes and Labels: 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. 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. Basic syntax for text controls: <asp:TextBox ID="txtstate" runat="server" ></asp:TextBox Common Properties of the Text Box and Labels: Property Description TextMode Specifies the type of text box. SingleLine creates a standard text box, MultiLIne creates a text box that accepts more than one line of text and the Password causes the characters that are entered to be masked. The default is SingleLine. Text The text content of the text box MaxLength The maximum numb...

Button Control in Asp.net

Button Controls: 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. When a user clicks a button control, two events are raised Click and Command. Basic syntax for button controls: <asp:Button ID="Button1" runat="server"              onclick="Button1_Click" Text="Click" />   Common Properties of the Button control: Property Description Text The text displayed by the button. This is for button and link button controls only. ImageUrl For image button control only. The image to be displayed for the button. AlternateText For image button control only. The text to be displayed if the browser can't display the image. ...