NET is a web development platform, which provides a programming model, a comprehensive software infrastructure and various services required to build up robust web applications for PC, as well as mobile devices. NET works on top of the HTTP protocol, and uses the HTTP commands and policies to set a browser-to-server bilateral communication and cooperation. All client side user activities are forwarded to the server for stateful processing. NET framework helps in storing the information regarding the state of the application, which consists of: The page state is the state of the client, i.e., the content of various input fields in the web form. Click the button to see effect: We have studied the page life cycle and how a page contains various controls. The page class has the following extremely useful properties that correspond to intrinsic objects: We will discuss each of these objects in due time. However, this object helps in checking some information such as the client browser and cookies. The content file: Run the page to see the following result: Controls are small building blocks of the graphical user interface, which include text boxes, buttons, check boxes, list boxes, labels, and numerous other tools. Net server controls inherit all properties, events, and methods of the Web Control and System. Other Navigation controls are: Menu control and Site Map Path control. Write a few lines of code to ensure that when a particular node is selected, the label control displays the node text and the text box displays all child nodes under it, if any. If more than one group is required in a single form, then specify a different group name for each group.
NET runtime codes, and incorporates the state of the server side components in hidden fields. The Web Control class itself and some other server controls that are not visually rendered are derived from the System. List boxes and drop-down lists contain one or more list items.
This way, the server becomes aware of the overall application state and operates in a two-tiered connected way. NET component model provides various building blocks of ASP. Basically it is an object model, which describes: All ASP. These lists can be loaded either by code or by the List Item Collection editor.
Create a new website and drag a label control and a button control on it from the control tool box. Set the Text property of the Button control as 'Click'. NET directives and we will use most of these directives throughout the tutorials. The basic syntax of Application directive is: The Assembly directive links an assembly to the page or the application at parse time.
Using the properties window, set the IDs of the controls as .lblmessage. The markup file (.aspx): using System; using System. The Application directive defines application-specific attributes. This could appear either in the file for application-wide linking, in the page file, a user control file for linking to a page or user control.
The HTML controls such as the header tags, anchor tags, and input elements are not processed by the server but are sent to the browser for display.