Chapter 28: ASP Intro
1. Which “ASP” are we actually talking about here?
There are three different technologies people call “ASP” — and W3Schools mixes two of them:
| Name | Real name / era | File extension | Main language inside | Status in 2026 | What W3Schools teaches |
|---|---|---|---|---|---|
| Classic ASP | Active Server Pages (1996–2002) | .asp | VBScript (default) or JScript | Legacy – almost dead | Yes – most of the tutorial |
| ASP.NET Web Pages (Razor) | WebMatrix / Razor Pages (2010–2014) | .cshtml / .vbhtml | C# or VB.NET | Legacy but still used | Yes – second part of the tutorial |
| Modern ASP.NET Core | Razor Pages / MVC / Blazor (2016–today) | .cshtml | C# (mostly) | Current & recommended | No – not covered |
W3Schools “ASP Tutorial” = Classic ASP + ASP.NET Web Pages (Razor) They teach both in the same section because they look similar on the surface:
- Mix HTML + server code in one file
- Use <% … %> (classic) or @ … (Razor)
- Handle forms with Request.Form / Request[“key”]
- Very beginner-friendly “one file = one page” style
2. The actual structure of https://www.w3schools.com/asp/
When you open that page you see:
Top navigation / sidebar:
- ASP HOME
- WP Tutorial
- WebPages Intro
- WebPages Razor
- WebPages Layout
- WebPages Folders
- WebPages Global
- WebPages Forms
- WebPages Objects
- WebPages Files
- WebPages Databases
- WebPages Helpers
- WebPages WebGrid
- WebPages Charts
- WebPages Email
- WebPages Security
- WebPages Publish
- WebPages Examples
- WebPages Classes
- ASP Examples
What it really means:
- First part (ASP HOME + ASP Intro + ASP Syntax + …) → Classic ASP with VBScript
- Second part (everything that starts with “WebPages”) → ASP.NET Web Pages (Razor + C#/VB)
They cleverly put both under one “ASP” umbrella because:
- They look similar to beginners
- Many people learned Classic ASP → then moved to Web Pages
- W3Schools wants one long tutorial instead of two separate ones
3. Classic ASP part – the original “ASP Tutorial” (1998–2005 style)
This is what most old developers mean when they say “ASP tutorial”.
File: hello.asp
|
0 1 2 3 4 5 6 |
<%@ Language=VBScript %> <% Option Explicit %> <!DOCTYPE html> <html> <body> <h1>Hello from Classic ASP!</h1> <% Dim name name = "Rahul from Hyderabad" Response.Write "<p>Welcome, " & Server.HTMLEncode(name) & "!</p>" %> <p>Server time right now: <%= Now() %></p> </body> </html> |
Typical Classic ASP patterns you see in W3Schools:
- <%@ Language=VBScript %> at the top
- Option Explicit (good practice)
- <% … %> for code blocks
- <%= expression %> for printing
- Response.Write for output
- Request.Form(“key”), Request.QueryString(“key”)
- Server.CreateObject(“ADODB.Connection”) for databases
4. ASP.NET Web Pages (Razor) part – the modern-ish part
This is the second half of the tutorial — much cleaner.
File: hello.cshtml
|
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
@{ Dim name = "Rahul from Hyderabad" Dim message = "Welcome, " & name & "!" } <!DOCTYPE html> <html> <body> <h1>Hello from ASP.NET Web Pages!</h1> <p>@message</p> <p>Server time: @Now.ToString("dd-MMM-yyyy hh:mm tt")</p> </body> </html> |
Or more modern C# style:
|
0 1 2 3 4 5 6 7 8 9 10 11 12 |
@{ var name = "Rahul from Hyderabad"; } <h1>Hello from Razor!</h1> <p>Welcome, @name!</p> <p>Time: @DateTime.Now.ToString("dd-MMM-yyyy hh:mm tt")</p> |
5. Quick Summary Table – What You Actually Get in “ASP Tutorial” on W3Schools
| Section | Technology taught | Syntax style | Still useful in 2026? |
|---|---|---|---|
| ASP Intro → ASP Include | Classic ASP (VBScript) | <% … %> | Only for legacy code |
| WP Tutorial → WebPages Classes | ASP.NET Web Pages (Razor) | @ … / @{ … } | Good learning step |
| WebPages Examples | Both Classic + Razor examples | Both | Very good practice |
6. Teacher Advice (very honest – 2026 perspective)
If someone sends you to “do the ASP tutorial on W3Schools”:
- Do the Classic ASP part first (first 10–15 pages) → Understand <% … %>, Request, Response, Session, ADODB — this is the foundation
- Then do the WebPages / Razor part → Learn @, @{ … }, IsPost, Layout, Database.Open, WebGrid, WebSecurity → This is much closer to modern .NET
- After that — stop and switch to ASP.NET Core Razor Pages → Same @ syntax, but faster, safer, cross-platform, actively supported → Microsoft Learn free path: https://learn.microsoft.com/en-us/aspnet/core/razor-pages/
You don’t need to master Classic ASP in 2026 unless you are maintaining 20-year-old banking/government software.
But understanding it helps a lot when you read old forum answers or meet senior developers who started in 2000–2005.
Questions for you?
- Want to see a full login + session example in Classic ASP?
- Or compare one page side-by-side in Classic ASP vs Razor vs ASP.NET Core?
- Or shall we start a mini-project using Razor Pages (modern way)?
- Or explain why so many Indian companies still run Classic ASP in 2026?
Just tell me — I’m here! 🚀🇮🇳 Happy learning, Webliance! 😊
