
Utilizing Standard Server Controls for Web Forms in ASP.Net
Explore how to effectively use standard server controls in ASP.Net to manage data presentation, common control events, and form interaction. Learn about working with various server controls and handling user interactions through C# code behind files.
Uploaded on | 0 Views
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
6.How to use the standard server controls By Chava Sravya Presentation ID:11 Pg 192-228
Topics to be covered An introduction standard server controls. How to use common server controls. How to work with button controls. How to work with list controls. A Checkout page that uses server controls. An Introduction to other server controls.
An Introduction to standard server controls Standard server controls are the ones in standard group of toolbox which get data and present the data in a web form. ASP.Net server controls are rendered as HTML elements. HTML elements are used when the controls are not going to change. For Instance if the control is to display the text that is changed by code behind file based on the user actions ASP.NET controls are used.
How to use C# to work with the data in server controls If our application needs to respond to an event, we code a method called an Event handler. When we generate an event handler an event attribute that names event handler is added to aspx code for the control. Then we enter the C# code for the event handler in code behind file.
To set focus, default button ,tab order, and access keys for a form
Description To set the control that receives focus when form is first displayed we use default focus To set the default button that causes a form to be submitted when user presses the Enter key, we can use default Button attribute of form Tab order is sequence in which controls receive focus when Tab key is pressed. Access keys are shortcut keys that user can press to move focus to specific controls on a form.
How to use the common server controls Attributes to work with labels and text boxes For a label AssociatedControlID For a text box, the text mode attribute(multiline/single line) rows attribute,wrap attribute,columns attribute,password,Email,tel
Code using labels and text boxes The aspx for a label and a multiline text box <label for= txtMessage >Please enter any special instructions</label> <asp:TextBox ID= 0 txtMessage" runat= server Rows= 5 TextMode= MultiLine > </asp:TextBox> The aspx tor a text box that gets an email address <asp:TextBox ID= txtEmail runat= server TextMode= Email ></asp:TextBox>
How to use check boxes and radio buttons
An event handler for the Command events of the buttons