Chapter 6 2 min read
Save

ASP.NET Web Development

DotNet Technology · BCA · Updated Apr 23, 2026

Table of Contents

ASP.NET Web Development

ASP.NET is Microsoft's framework for building dynamic web applications. ASP.NET Web Forms provides a drag-and-drop, event-driven model similar to Windows Forms. ASP.NET MVC and ASP.NET Core are modern alternatives.

ASP.NET Basics

ASP.NET pages have the .aspx extension and use a code-behind model (.aspx.cs). The page lifecycle includes Init, Load, Postback event handling, and Render. IsPostBack distinguishes first load from subsequent postbacks. The Page class provides access to request, response, and session objects.

Server Controls

Server controls run on the server and generate HTML. Standard controls include asp:TextBox, asp:Button, asp:Label, asp:DropDownList, asp:GridView. Validation controls include RequiredFieldValidator, RangeValidator, CompareValidator, RegularExpressionValidator, and CustomValidator.

State Management

HTTP is stateless; ASP.NET provides state management mechanisms. Client-side: ViewState (hidden field, default), cookies, query strings, hidden fields. Server-side: Session state (per user), Application state (global), Cache, and database. ViewState serialises control values between postbacks.

Master Pages and Themes

Master pages define a common layout with ContentPlaceHolder controls. Content pages reference the master and fill placeholders. Themes and skins apply consistent styling across pages. CSS integration provides modern styling.

Data Controls

GridView displays tabular data with built-in paging, sorting, and editing. DetailsView shows one record at a time. FormView uses templates. Repeater and ListView offer flexible templated rendering. Data sources include SqlDataSource, ObjectDataSource, and LinqDataSource.

Authentication and Authorisation

ASP.NET supports Windows authentication, Forms authentication (login page with cookies), and membership providers. The web.config file configures authentication mode. The Authorize attribute and location-based rules restrict access. ASP.NET Identity is the modern membership system.

Web Services

Web services expose functionality over HTTP. ASMX services use SOAP and WSDL. WCF (Windows Communication Foundation) unifies various communication models. Web API creates RESTful services returning JSON. ASP.NET Core Web API is the modern approach.

Summary

ASP.NET provides a comprehensive platform for web development with server controls, state management, data binding, authentication, and web services. Understanding both Web Forms and modern ASP.NET patterns prepares students for professional web development.

Related Notes

Discussion

0 comments

Join the discussion

Log in to share your thoughts and help fellow students.

Log in to comment

No comments yet. Be the first to share your thoughts!