
ASP.NET (Active Server Pages .NET) is a server-side web framework developed by Microsoft used to build dynamic web applications and websites .
ASP.NET (Active Server Pages .NET) is a server-side web framework developed by Microsoft used to build dynamic web applications and websites.
๐ It mainly uses C# or VB.NET for coding.
๐ Draw this in exam:
Browser โ Request โ Web Server (ASP.NET)
โ
Process Code (C#)
โ
HTML Response โ Browser
โ Code runs on server, not visible to user.
<%@ Page Language="C#" %>
<html>
<body>
<%
Response.Write("Hello World");
%>
</body>
</html>
Controls are elements used to build UI.
<input type="text">
<asp:TextBox ID="txtName" runat="server" />
protected void Button1_Click(object sender, EventArgs e)
{
Response.Write("Button Clicked");
}
<asp:TextBox ID="txtName" runat="server" />
<asp:Button ID="btn" runat="server" OnClick="Button1_Click" />
SqlConnection con = new SqlConnection("connection_string");
con.Open();
Session["user"] = "Ali";
Response.Cookies["user"].Value = "Ali";
๐ Draw this:
1. Page Request
2. Initialization
3. Load
4. Event Handling
5. Render
6. Unload
โ File extension: .aspx
โ Uses C# or VB.NET
โ Runs on IIS server
โ Uses event-driven model
โ Code is compiled
| Feature | ASP.NET | JSP | PHP |
|---|---|---|---|
| Language | C# | Java | PHP |
| Performance | High | High | Moderate |
| Complexity | Medium | High | Low |
| Platform | Windows | Cross-platform | Cross-platform |
ASP.NET = Microsoft server-side framework
Uses C# / VB.NET
Key concepts:
High performance due to compiled code
๐ Used for enterprise-level web applications.
Open this section to view and download past papers
Click on Show Past Papers to load available exam papers.