Official Study Materials for Computer Science
Access comprehensive study materials and useful resources for .NET Technology using the Application of .NET Technology Unit 05 ASP.NET 2.0 Notes Set 01. Designed to align with the 2026-27 academic guidelines, these advanced resources help Computer Science students reinforce core concepts beyond standard textbooks.
Advanced Resources for Computer Science
Navigate directly to the advanced Computer Science study materials using the digital viewer below. Each resource pack includes detailed conceptual summaries and solved practice questions, allowing students to instantly reinforce their learning.
This page covers what is new in ASP.NET 2.0 and the goals behind the release, including the provider model, the partial-class code-behind model, the administration tools and the four compilation options. It then walks through the Visual Studio 2005 development tools, the stages of the Web form processing life cycle and how server controls are declared and rendered, with a ControlsDemo example in VB.NET and C#.
What's New in ASP.NET
1. The Microsoft .NET Framework version 2.0 includes significant enhancements to ASP.NET in virtually all areas.
2. ASP.NET has been improved to provide out-of-the-box support for the most common Web application situations.
3. You will find that you can get Web sites and pages up and running more easily and with less code than ever before.
4. At the same time, you can add custom features to ASP.NET to accommodate your own requirements.
Specific areas in which ASP.NET has been improved are:
Productivity
1. You can easily and quickly create ASP.NET Web pages and applications using new ASP.NET server controls and existing controls with new features.
2. New areas such as membership, personalization, and themes provide system-level functionality that would normally require extensive developer coding.
3. Core development scenarios, particularly data, have been addressed by new data controls, no-code binding, and smart data-display controls.
Flexibility and extensibility
1. Many ASP.NET features are extensible so that you can easily incorporate custom features into applications.
2. The ASP.NET provider model, for example, provides pluggable support for different data sources.
Performance
1. Features such as pre compilation, configurable caching, and SQL cache invalidation allow you to optimize the performance of your Web applications.
Security
1. It is now easier than ever to add authentication and authorization to your Web applications.
Hosting
1. ASP.NET includes new features that make it easier to manage a hosting environment and create more opportunities for hosters to add value.
Computer languages and frameworks evolve as the needs of the development community evolve. ASP.NET is certainly no exception. ASP.NET 2.0 is the first major update to the ASP.NET framework and includes solutions to common problems encountered with ASP.NET 1.x as well as new features that greatly increase the flexibility and functionality of Web development on the .NET platform. If you are still working with ASP applications, then ASP.NET 2.0 offers even more incentive to upgrade.
Goals of ASP.NET 2.0
Improve the reliability and usability of Web applications:
1. Currently, many ASP.NET 1.x applications run on Microsoft IIS 5.0. ASP.NET 2.0 leverages new IIS 6.0 features for improved performance and scalability.
2. Specifically, IIS 6.0 provides a new process model which greatly enhances the ability of a server to host multiple applications in a truly independent fashion.
3. Each ASP.NET application resides in its own isolated process and cannot accidentally interact with other applications. Quite simply put, applications can no longer break each other.
4. Each application runs completely separated from every other application. If one application crashes, it doesn't affect other applications.
5. In terms of usability, new features such as master pages and themes allow you to develop large Web applications using a consistent structure that is manageable and configurable.
Reduce the number of lines of code you have to write in common scenarios:
1. ASP.NET 2.0 includes wizards and controls that allow you to perform frequent tasks (e.g. data access) without having to write a single line of code.
2. Visual Studio 2005 includes designers to layout and configure complex pages with data bound tables.
3. As a developer, you can use the wizards to work faster and smarter.
4. ASP.NET 2.0 also leverages changes in the .NET Framework.
Offer user features to personalize Web applications:
1. ASP.NET 2.0 includes built-in controls to help you manage user accounts and personalize the content and layout of pages in your application.
2. First, the membership service lets you track users.
3. The new login controls integrate with the membership service to allow you to automate account creation and user login without writing any code.
4. The new Web Parts feature allows you to create Web applications that contain controls that can be edited and personalized by users.
5. Users can select and customize the parts that are displayed on a Web page as they see fit.
6. Finally, the Profile service provides long-term persistence of user preferences and data through declarative XML configuration.
Provide enhanced design features to generate consistent layouts and design:
1. ASP.NET 2.0 supports master pages, themes and skins to build applications with a consistent page layout and design.
2. These new features are easy to implement and modify, and greatly enhance the manageability and maintainability of large applications.
3. Many of the new features in ASP.NET 2.0 are aimed specifically at addressing these goals.
4. ASP.NET 2.0 builds on ASP.NET 1.x to provide a powerful Web application development platform.
What Does ASP.NET 2.0 Mean To ASP Developers?
1. For ASP developers, the impact of the many new features in ASP.NET 2.0 is largely dependent on your development background.
2. You no longer have to worry about HTML tags, POST, GET, and query strings.
3. You can focus on developing code that implements business logic.
4. Classic ASP mixed script and markup, and this spaghetti code made readability very difficult.
5. Scripting code could be inserted anywhere, which also made it hard to build well-designed applications that shared code properly and in an extensible fashion.
6. You can also leverage master pages to quickly create a coherent design for your application, or apply skins and themes to programmatically set the look and feel of your Web pages.
Changes in Architecture
1. The fundamental architecture of ASP.NET has always been designed for flexibility and extensibility.
2. ASP.NET 2.0 continues this tradition by incorporating a new provider model to support many of the new features.
3. New utilities and APIs have been added to improve site maintenance and improve configuration.
4. All of these changes are designed to make developing ASP.NET 2.0 applications a faster and more streamlined process while still providing the flexibility and extensibility that developers were used to with ASP.NET 1.x.
ASP.NET 2.0 Providers
1. The provider model defines a set of interfaces and hooks into the data persistence layer that provides storage and retrieval for specified requests.
2. In this way the provider model acts as a programming specification that allows ASP.NET 2.0 to service unique client concerns.
3. ASP.NET 2.0 uses a wide variety of providers, including those listed below.
| Provider | Description |
|---|---|
| Membership | The membership provider supports user authentication and user management. |
| Profile | The profile provider supports storage and retrieval of user specific data linked to a profile. |
| Personalization | The personalization provider supports persistence of Web Part configurations and layouts for each user. |
| Site Navigation | The site navigation provider maps the physical storage locations of ASP.NET pages with a logical model that can be used for in-site navigation and linked to the various new navigation controls. |
| Data providers | ADO.NET has always used a provider model to facilitate the connection between a database and the ADO.NET API. ASP.NET 2.0 builds upon the data provided by encapsulating many of the ADO.NET data calls in a new object called a data source. |
Each type of provider acts independently of the other providers. You can therefore replace the profile provider without causing problems with the membership provider.
The ASP.NET 2.0 Coding Model
1. In ASP.NET 1.x, you could develop an ASP.NET page in one of two ways. First, you could put your code directly inline with your ASP.NET tags.
2. The code inline model is very similar to the coding model that was prevalent with classical ASP and other scripting languages. However, the code inline model has several problems such as the intermixing of code and HTML.
3. ASP.NET 1.0 introduced the code behind model as a replacement. The code behind model used an external class to house the code, while the ASPX page contained the HTML and ASP.NET tags.
4. The code behind model thus successfully separated code from content; however it created some interesting inheritance issues and forced the developer to keep track of two files for each Web page.
5. The primary difference between a code behind file in ASP.NET 1.x and ASP.NET 2.0 is that a code behind file is now a partial class rather than a full class that inherits from the ASPX page.
6. A partial class is a new .NET construct that allows you to define a single class in multiple source files.
7. In ASP.NET 2.0, a partial class is particularly useful for code behind files as it removes the inheritance relationship that is present with the older code behind model.
8. The two partial classes are merged into a single class during compilation.
9. The code behind file is therefore free of all of the control declarations and inheritance issues associated with the old code behind model.
10. The most striking difference can be seen in the actual code behind file, which no longer contains all of the auto-generated code that used to be necessary to maintain the inheritance relationship.
A new code behind file
1. When you use the code-behind model in Visual Studio 2005, any code you add to the page will automatically be added to a <script> block within the ASPX file instead of to a code behind class.
2. However, Visual Studio 2005 still displays the code in the code view.
3. In other words, you can keep using Visual Studio like you always have, except that code will be placed directly in the ASPX page instead of a separate class.
Configuration and Site Maintenance
1. One of the more difficult challenges as an ASP.NET developer was properly configuring the Web.config file.
2. In ASP.NET 2.0 and Visual Studio 2005, you now have several new features to help you with this task.
IntelliSense in Web.config
1. First, Visual Studio's IntelliSense feature has now been extended to any XML file that has a valid schema.
2. In the case of the Web.config file, this means that you get full IntelliSense support whenever you edit the Web.config file from within Visual Studio.
3. IntelliSense helps reduce the chance of misconfigured files.
4. However, ASP.NET 2.0 also includes a new administrative Website and a Microsoft Management Console to make things even easier.
Administrative Website
1. To simplify the process of managing users, it provides a built in Website configuration tool.
2. The Web Site Administration Tool is a simple Website that can only be accessed on the localhost through Visual Studio 2005.
3. Through this tool, an administrator can manage the application by configuring services such as user management, the personalization providers, security, and profiles.
4. The tool also allows you to easily configure debugging and tracing information for your application.
5. Although the tool is limited to local applications, you can easily access all of the same configuration features through the improved configuration and administration API.
Microsoft Management Console Snap-In
1. ASP.NET 2.0 deploys a special Microsoft Management Console (MMC) snap in for IIS that lets you decide which applications should use which versions of the .NET Framework.
2. The MMC IIS tab lets you to choose which version of ASP.NET your application uses and displays the Web.config location.
3. In addition to managing the framework version, the console has an "Edit configuration" button which lets you visually edit most of the Web.config settings without having to directly manipulate the Web.config XML file.
4. As an administrator, you will find that this MMC snap-in provides an incredibly useful tool for configuring and managing multiple ASP.NET applications on a single server.
Enhanced Configuration APIs
System.Configuration.Configuration class
1. We can also retrieve and edit configuration information using the System.Configuration.Configuration class.
2. The APIs let you programmatically access XML configuration files.
3. The following code displays the type of authentication enabled for an application on your local machine.
Configuration config = WebConfigurationManager.OpenWebConfiguration("~");
AuthenticationSection authSection =
config.GetSection("system.web/authentication") as AuthenticationSection;
Response.Write("Authentication mode is: " + authSection.Mode);Compilation Options
ASP.NET 2.0 offers four different compilation models for a Web application:
1. Normal (ASP.NET 1.x)
1. In a normal ASP.NET Web application, the code behind files were compiled into an assembly and stored in the /bin directory.
2. The Web pages (ASPX) were compiled on demand.
3. This model worked well for most Websites. However, the compilation process made the first request of any ASP.NET page slower than subsequent requests.
4. ASP.NET 2.0 continues to support this model of compilation.
2. Batch compilation
1. In ASP.NET 2.0, you can batch compile any application with a single URL request.
2. As with ASP.NET 1.x, batch compiling removes the delay on the first page request, but creates a longer cycle time on startup.
3. In addition, batch compilation still requires that the code behind files are compiled pre-deployment.
3. Deployment pre-compilation
1. A new feature of ASP.NET 2.0 allows for full compilation of your project prior to deployment.
2. In the full compilation, all of the code behind files, ASPX pages, HTML, graphics resources, and other back end code are compiled into one or more executable assemblies, depending on the size of the application and the compilation settings.
3. The assemblies contain all of the compiled code for the Website and the resource files and configuration files are copied without modification.
4. This compilation method provides for the greatest performance and enhanced security.
5. If you are working with highly visible or highly secure Websites, this option is the best choice for final deployment.
6. However, if you are building a small site running on your local intranet, and the site changes frequently, full pre-compilation may be overkill.
4. Full runtime compilation
1. At the other extreme of deployment pre-compilation, ASP.NET 2.0 provides a new mechanism to compile the entire application at runtime.
2. That is, you can put your un-compiled code behind files and any other associated code in the new \code directory and let ASP.NET 2.0 create and maintain references to the assembly that will be generated from these files at runtime.
3. This option provides the greatest flexibility in terms of changing Website content at the cost of storing un-compiled code on the server.
Development Tools
ASP.NET 2.0 and Visual Studio 2005 also change many of the day to day aspects of Web application development. In this section, we will look at several of the areas where features available in ASP.NET 1.x have been heavily modified.
IntelliSense
1. IntelliSense helps you develop code faster by issuing "popup" programming hints.
2. Every time you reference an object in your code, IntelliSense offers you a list of available methods, properties and events.
3. You no longer have to type out complete methods, or search documentation for parameter specifications.
4. Previous releases of Visual Studio.NET had excellent IntelliSense support, but Visual Studio 2005 allows you to take advantage of IntelliSense in script blocks, inline CSS style attributes, configuration files and any XML file that contains a DTD or a XML schema reference.
Wizards to auto-generate code for many tasks
1. One of the major goals of ASP.NET 2.0 is to reduce development time and the number of lines of code you have to write.
2. Visual Studio 2005 includes wizards you can use to create data source connections, and many other common tasks.
Designer support for master pages, themes and skins
1. Classic ASP pages required you to start each page from scratch. Replicating page layout in an application was a time-consuming process.
2. Visual Studio 2005 provides full WYSIWYG support for ASP.NET master pages.
3. Master pages are page templates that can be used to apply a consistent style and layout to each page in your application.
4. After you create a master page, you can easily create new pages that leverage your master page, and let ASP.NET automatically apply the style and layout of the master page.
5. Visual Studio 2005 lets you see how any content you add to a page will look when combined with the master page.
Improved code editing features
1. Editing code is not an easy task in traditional ASP applications.
2. Visual Studio 2005 makes code editing much easier by preserving all HTML code (including white space, casing, indention, carriage returns, and word wrapping).
3. Visual Studio 2005 allows you to set style formats for the HTML code for your application that can be imported or exported to standardize development for your whole team.
4. Style sheets allow you to format the way your content is displayed to a user.
5. Visual Studio 2005 allows you to customize the format for how your HTML code is written. For example, you can enforce style guidelines to ensure all HTML tags are capitalized, or that all nested HTML elements are indented two spaces.
6. These guidelines allow your entire development team to develop pages with the same formatting rules.
7. Visual Studio 2005 also supports tag-outline and tag-navigation modes to help you edit large documents. These modes allow you to move through, expand, and collapse HTML and ASP.NET tags, and to see open and closed tag relationships clearly.
8. You can easily add and edit tables into HTML pages using the "Insert Table" dialog box. The wizard lets you specify the style, size (table width and the number of rows and columns), and format of a table without writing any code.
Visual Studio 2005 includes a light weight Web server
1. Visual Studio 2005 includes a light-weight Web server for developing ASP.NET applications.
2. The Web server services local requests only and is perfect for development.
3. By adding this Web server, you no longer need to use IIS on a development machine. You can use the built-in server, and get full debugging support.
4. Another important advantage is any user can build and test an application. You no longer need to be an administrator on the computer.
5. It should be noted that you must still deploy your final applications on IIS.
Improved debugging environment
1. Debugging applications in ASP is an arduous process, as code is interpreted on the fly.
2. Syntax errors aren't exposed until you run applications.
3. The debugging support is improved in Visual Studio 2005.
4. Visual Studio .NET 2003 provided limited support for edit-and-continue debugging. Visual Studio 2005 improves edit-and-continue debugging and provides more information during the debugging process.
5. For example, an improved implementation of DataTips provides information about variables and expressions as mouse popup windows during the debugging process.
6. Visual Studio 2005 also provides additional features, like advanced debugging with breakpoints on disassembly, registers, addresses (when applicable), and "Just My Code Stepping".
Stages in Web forms Processing
Page Framework Initialization
The page's Page_Init event is raised, and the page and control view state are restored.
Uses
1. During this event, the ASP.NET page framework restores the control properties and postback data.
2. This is the stage in which ASP.NET first creates the page. It generates all the controls you have defined with tags in the .aspx web page.
3. In addition, if the page is not being requested for the first time (in other words, if it's a postback), ASP.NET deserializes the view state information and applies it to all the controls.
4. At this stage, the Page.Init event fires. However, this event is rarely handled by the web page, because it's still too early to perform page initialization.
User Code Initialization
The page's Page_Load event is raised.
1. At this stage of the processing, the Page.Load event is fired.
2. Most web pages handle this event to perform any required initialization (such as filling in dynamic text or configuring controls).
3. The Page.Load event always fires, regardless of whether the page is being requested for the first time or whether it is being requested as part of a postback.
Uses: read and restore values stored previously
1. Using the Page.IsPostBack property, check whether this is the first time the page is being processed.
2. If this is the first time the page is being processed, perform initial data binding.
3. Otherwise, restore control values.
4. Read and update control properties.
Validation
The syntax for creating a Validation server control is:
<asp:control_name id="some_id" runat="server" />
The Validate method of any validator Web server controls is invoked to perform the control's specified validation.
| Validation Server Control | Description |
|---|---|
| CompareValidator | Compares the value of one input control to the value of another input control or to a fixed value. |
| CustomValidator | Allows you to write a method to handle the validation of the value entered. |
| RangeValidator | Checks that the user enters a value that falls between two values. |
| RegularExpressionValidator | Ensures that the value of an input control matches a specified pattern. |
| RequiredFieldValidator | Makes an input control a required field. |
| ValidationSummary | Displays a report of all validation errors occurred in a Web page. |
1. ASP.NET includes validation controls that can automatically validate other user input controls and display error messages.
2. These controls fire after the page is loaded but before any other events take place.
Uses
1. There is no user hook at this stage.
2. You can test the outcome of validation in an event handler.
Event Handling
The general syntax of an event is:
private void EventName (object sender, EventArgs e);
1. If the page was called in response to a form event, the corresponding event handler in the page is called during this stage.
2. When you use the data source controls, ASP.NET automatically performs updates and queries against your data source as part of the page life cycle.
Uses
1. Handle the specific event raised.
2. Check the IsValid property of the page or of individual validation controls.
3. Manually save the state of page variables that you are maintaining yourself.
4. Manually save the state of controls dynamically added to the page.
Cleanup
The Page_Unload event is called because the page has finished rendering and is ready to be discarded.
1. At the end of its life cycle, the page is rendered to HTML.
2. After the page has been rendered, the real cleanup begins, and the Page.Unload event is fired.
3. At this point, the page objects are still available, but the final HTML is already rendered and can't be changed.
4. Remember, the .NET Framework has a garbage collection service that runs periodically to release memory tied to objects that are no longer referenced.
5. If you have any unmanaged resources to release, you should make sure you do this explicitly in the cleanup stage or, even better, before.
6. When the garbage collector collects the page, the Page.Disposed event fires. This is the end of the road for the web page.
Uses: perform final cleanup work
1. Closing files.
2. Closing database connections.
3. Discarding objects.
Introduction to Server Controls
1. It's important to understand how server controls operate and how they are completely different from the way you define controls in other languages like classic ASP or PHP, another popular programming language for creating dynamic web sites.
2. To output the text in a text box in these languages, you would use plain HTML and mix it with server-side code.
<input type="text" value="Hello World, the time is <%=Time()%>" />
1. As you can see, this code contains plain HTML, mixed with a server-side block, delimited by <% and %> that outputs the current time using the equals (=) symbol.
2. This type of coding has a major disadvantage: the HTML and server-side code is mixed, making it difficult to write and manage your pages.
3. Although this is a trivial example in which it's still easy to understand the code, this type of programming can quickly result in very messy and complex pages.
4. Server controls work differently. In ASP.NET, the controls "live" on the server inside an ASPX page.
5. When the page is requested in the browser, the server-side controls are processed by the ASP.NET runtime, the engine that is responsible for receiving and processing requests for ASPX pages.
6. The controls then emit client-side HTML code that is appended to the final page output. It's this HTML code that eventually ends up in the browser, where it's used to build up the page.
Declaring a server control
Instead of defining HTML controls in your pages directly, you define an ASP.NET Server Control with the following syntax, where the italicized parts differ for each control.
<asp:TypeOfControl ID="ControlName" Runat="Server" />
1. Note that the control has two attributes: ID and Runat.
2. The ID attribute is used to uniquely identify a control on the page, so you can program against it.
3. It's important that each control on the page has a unique ID; otherwise the ASP.NET runtime won't understand what control you're referring to. If you accidentally type a duplicate control ID, Visual Web Developer (VWD) will signal the problem in the error list.
4. The mandatory Runat attribute is used to indicate that this is a control that lives on the server. Without this attribute, the controls won't be processed and will end up directly in the HTML source.
5. If you ever feel you're missing a control in the final output in the HTML of the browser, ensure that the control has this required attribute.
6. Note that for non-server elements, like plain HTML elements, the Runat attribute is optional. With this attribute on non-server controls, they can be reached by your programming code.
7. You can easily add the Runat attribute to an existing element by typing runat and pressing the Tab key.
8. For the controls that ship with ASP.NET you always use the asp: prefix followed by the name of the control.
<asp:TextBox ID="Message" Runat="Server" />
For example, to create a TextBox that can hold the same welcome message and current time, you can use the self-closing tag above, where the closing slash (/) is embedded in the opening tag. This is quite common for controls that don't need to contain child content such as text or other controls. However, the long version, using a separate closing tag is acceptable as well:
<asp:TextBox ID="Message" Runat="Server"></asp:TextBox>
You can control the default behavior of closing tags per tag using Tools | Options | Text Editor | HTML | Formatting | Tag Specific Options. You can program against this text box from code that is either placed inline with the page or in a separate Code Behind file.
VB.NET
Message.Text = "Hello World, the time is " & DateTime.Now.TimeOfDay.ToString()
C#
Message.Text = "Hello World, the time is " + DateTime.Now.TimeOfDay.ToString();
The definition of the control in the markup section of the page is now separated from the actual code that defines the text displayed in the text box, making it easier to define and program the text box (or any other control) because it enables you to focus on one task at a time: either declaring the control and its visual appearance in the markup section of the page, or programming its behavior from a code block.
Trying out server controls (ControlsDemo.aspx)
You add a TextBox, a Label, and a Button control to a page. When you request the page in the browser, these server controls are transformed into HTML, which is then sent to the client. By looking at the final HTML for the page in the browser, you'll see how the HTML is completely different from the initial ASP.NET markup.
1. In the Demos folder in the Solution Explorer, create a new Web Form called ControlsDemo.aspx. Choose your programming language and make sure the Web Form uses Code Behind.
2. Switch to Design View. From the Toolbox, drag a TextBox, a Button, and a Label control onto the design surface within the dashed lines of the <div> tag that was added for you when you created the page.
3. Type the text Your name in front of the TextBox and add a line break between the Button and the Label by positioning your cursor between the two controls in Design View and then pressing Enter. If you're having trouble positioning the cursor between the controls, place it after the Label control and then press the left arrow key twice. The first time you press it, the Label will be selected; the second time, the cursor is placed between the two controls, enabling you to press Enter.
4. Right-click the Button and choose Properties to open up the Properties Grid for the control. Pressing F4 after selecting the Button does the same thing. The window that appears enables you to change the properties for the control, which in turn influence the way the control behaves at runtime.
5. Set the control's Text property to Submit Information and set its ID to SubmitButton. Change the ID of the TextBox to YourName using the Properties Grid.
6. Clear the Text property of the Label using the Properties Grid. You can right-click the property's label in the grid and choose Reset, or you can manually remove the text. You can leave its ID set to Label1.
7. Still in Design View, double-click the button to have VWD add some code to the Code Behind of the page that will be fired when the button is clicked in the browser. Add the line of code that sets Label1.Text to the code block that VWD inserted for you:
VB.NET
Protected Sub SubmitButton_Click(ByVal sender As Object,
ByVal e As System.EventArgs) Handles SubmitButton.Click
Label1.Text = "Your name is " & YourName.Text
End SubC#
protected void SubmitButton_Click(object sender, EventArgs e)
{
Label1.Text = "Your name is " + YourName.Text;
}1. Save the changes to the page and then open it in the browser by pressing Ctrl+F5.
2. When it appears in the browser, don't click the button yet, but open up the source of the page by right-clicking the page in the browser and choosing View Source or View Page Source. You should see the following HTML code.
<div>
Your name <input name="YourName" type="text" id="YourName" />
<input type="submit" name="SubmitButton" value="Submit Information"
id="SubmitButton" />
<br />
<span id="Label1"></span>
</div>1. Switch back to your browser, fill in your name in the text box, and click the button. When the page is done reloading, open up the source for the page in the browser again using the browser's right-click menu.
2. When you click the button, the control causes a postback, which sends the information for the controls in the page to the server, where the page is loaded again. Additionally, the code that you wrote to handle the button's Click event is executed. This code takes the name you entered in the text box and then assigns it to the Label control:
Label1.Text = "Your name is " + YourName.Text;
The Label control contains the text you entered in the text box, so when it is asked for its HTML, it now returns this:
<div>
Your name <input name="YourName" type="text" value="Imar" id="YourName" />
<input type="submit" name="SubmitButton" value="Submit Information"
id="SubmitButton" />
<br />
<span id="Label1">Your name is Imar</span>
</div>1. Although you defined the Label control with the <asp:Label> syntax, it ends up as a simple <span> element in the browser.
2. Because the Text property of the Label control is empty, you don't see any text between the two <span> tags.
3. The same applies to other controls; an <asp:TextBox> ends up as <input type="text">, whereas the <asp:Button> ends up as <input type="submit">.
4. Simply drag controls from the Toolbox onto the design surface of the page. This makes it very easy to add a bunch of controls to a page to get you started. However, because of the way the design surface works, it's sometimes difficult to add them exactly where you want them.
Free study material for Computer Science
Useful Resources and Notes for Computer Science .NET Technology
Essential Notes for Computer Science
Explore essential learning tools for Computer Science .NET Technology. This curated collection features in-depth notes and targeted practice questions built around the active 2026 curriculum to streamline your daily revision.
Verified Solutions for Computer Science
Built using official NCERT guidelines for Computer Science, these materials provide reliable academic support. Integrating past examination questions and step-by-step solutions helps students understand official CBSE grading criteria.
Enhance Accuracy with Online Tests
Wrap up your chapter revision by testing your knowledge against standard objective question formats. Explore our full library of free, up-to-date sample papers and online assessments to secure top grades in your CBSE examinations.
FAQs
The latest 2026-27 advanced study resources for Computer Science are available for free on StudiesToday.com which includes NCERT Exemplars, high-order thinking skills (HOTS) questions, and deep-dive concept summaries.
Our exhaustive Computer Science package includes chapter wise revision notes, solved practice sheets, important formulas and Concept Maps to help in better understanding of all topics.
Yes. For , our resources have been developed to help you get better marks in school exams and also build fundamental strength needed for entrance tests including Competency Based learning.
in , students should use Active Recall method, read the concept summary, then solve the Important Questions section without looking at the answers and then check your answers.
All Computer Science study materials are provided in mobile-friendly PDF. You can download and save them on your device.
Yes, our team has ensured that all Computer Science materials for are strictly aligned with the National Education Policy (NEP) 2020 and the latest 2026-27 syllabus.