Learn ASP.NET: Get Started Building with Microsoft Development Tools
Disclosure: Your support helps keep the site running! We earn a referral fee for some of the services we recommend on this page. Learn more
ASP is short for Active Server Pages. It was the first server-side scripting language for Microsoft’s IIS web server.
You can think of it like the Microsoft version of PHP. However, ASP was quickly replaced by ASP.NET, an open-source server-side framework.
Whereas PHP is a language, ASP.NET is a framework that can be used with any number of other languages — most notably C# and Visual Basic (VB.NET).
As with most server-side scripting, ASP.NET files are at base HTML files. They are different in that they will also include sections of ASP.NET code put between
%> symbols. This code is processed by the ASP.NET framework with the output sent back to the web client that requested it.
A Brief History ASP.NET
In 1996, Microsoft introduces ASP 1.0 as part of its IIS server.
The following year, they released ASP 2.0, which introduced some of the advanced objects that would become a standard part of ASP programming, like the
Session object that handles user data from page to page.
The last version of ASP was released in 2000. It is now referred to as “ASP Classic.”
That same year, Microsoft began developing its .NET framework.
It is fundamentally a collection of libraries that provide access to a broad range of functions. The other main part of it is that it supports an arbitrary number of languages.
So ASP.NET allows programmers to develop server-based web applications using a number of different languages.
ASP.NET is currently in its fifth version. They are distinct from each other as follows:
- Version 1 (2002): the base system with WebForms, which allow programmers to develop webpages using an object oriented approach.
- Version 2 (2005): added more controls, themes and skins, and 64-bit processing.
- Version 3 (2006): added WPF, WP, and other systems.
- Version 4 (2010): updated to .NET 4.
- Version 5 (2016): updated to .NET 4.6.
What Can ASP.NET Be Used For?
ASP.NET is not a general-purpose programming environment. You wouldn’t, for example, use it to create a standalone application. But its components can be used in this way. C# and Visual Basic can be used in a variety of ways. And that goes for the .NET framework itself.
Instead, ASP.NET is designed to create dynamic web pages. Users request an ASP.NET webpage, the server processes the page, substituting the appropriate data into the page based upon the code, and then sends a normal HTML page back to the user.
The most common kinds of ASP.NET coding involves interacting with a server-side database. Thus, there are ASP.NET applications for blogs, eCommerce, forums, and just about anything else that you can imagine.
Getting Started With ASP.NET
In order to program with ASP.NET, you will need to have access to an IIS server. You could run your own server on a local Windows machine. But it is just as likely that you will have a website hosted with a Windows system.
There are two aspects to learning ASP.NET: the language and the framework itself.
There are a number of languages that you can use, but the two most popular are C# and Visual Basic. Both are excellent choices for anything you might want to do.
But if you have experience with a C or Java, you will probably want to use C#. If you are new to programming, Visual Basic is easy to learn.
There are a lot of resources for learning the various aspects of ASP.NET. We’ll go over them here.
But most of these resources should be easy to use if you have a basic understanding of programming.
- Tutorials Point ASP.NET Tutorial: 34 tutorials that provide a solid introduction with examples using C#.
- Get Started with ASP.NET: many resources for the new ASP.NET developer. It provides a detailed introduction to ASP.NET for people with experience on other development platforms.
- The Complete ASP.NET Tutorial: a thorough ASP.NET tutorial with C# examples.
- Tutorials Point VB.NET — Web Programming: an introduction to programming websites with Visual Basic and the .NET framework.
- ASP.NET 4.5 Web Forms Tutorial Series in Visual Basic: 10 tutorials on using Visual Basic within ASP.NET.
- Introduction to ASP.NET Web Programming Using the Razor Syntax: a good introduction to ASP.NET with Visual Basic examples.
Basic ASP.NET Books
- Beginning ASP.NET 4.5.1: in C# and VB by Imar Spaanjaars: an excellent foundation to learn ASP.NET on.
- Professional ASP.NET 4.5 in C# and VB by Gaylord et al: a thorough introduction to ASP.NET with examples in both C# and Visual Basic.
- ASP.NET For Dummies by Bill Hatfield: a very old but well written and useful introduction to the core of ASP.NET.
- ASP.NET 4 Unleashed by Walther, Hoffman, and Dudek: an enormous book with hundreds of of examples that show how ASP.NET is used in the real world.
Moving Ahead With ASP.NET
After you have a working knowledge of the ASP.NET framework you will want to increase your understanding of whatever language you are using. We are focusing on the most popular languages: C# and Visual Basic.
Getting Going With C#
Most of these resources focus on the use of C# as a standalone development platform. You may want to start with the resources under Getting Started With ASP.NET first, or study them in tandem.
- Getting Started with Visual C#: the motherlode of C# resources from Microsoft itself. This can be a bit much for novices, but it is an excellent resources. Of particular interest is its set of tutorials.
- C# Station Tutorial: a detailed tutorial for beginning to intermediate programmers. It includes a lot of clear examples.
- Zet Code C# Tutorial: another detailed tutorial similar to the C# Station Tutorial.
- Learn C#: this is a very simple interacting tutorial. Created by learnCS.org, it provides exercise windows where you can change and run the example code.
- Tutorials Point C# Tutorial: 28 short tutorials. This site allows you to run each of the examples in a popup window.
- The Complete C# Tutorial: 49 short lessons that cover the most important aspects of the language.
- Hanspeter Mössenböck C# Tutorials: two different ones — an introduction and one on advanced topics. They are distributed as pdfs and are appropriate for people who are already comfortable with programming in a general sense.
- Beginning Visual C# 2012 Programming by Watson et al: introduction to programming using the C# language.
- Beginning C# Object-Oriented Programming by Dan Clark: focused on object oriented programming with examples in C#.
- Programming C# 5.0: Building Windows 8, Web, and Desktop Applications for the .NET 4.5 Framework by Ian Griffiths: a thorough introduction into C# using the .NET framework.
- Microsoft Visual C# Step by Step by John Sharp: a thorough reference for experienced C# programmers.
- C# in Depth by Jon Skeet: a fairly advanced book that discusses the various version of C#.
Getting Going With Visual Basic
These resources focus of Visual Basic as a general purpose language. This even includes things like VBScript, which is the language used in Access and other parts of the Office suite.
- Visual Basic Tutorial: basic tutorials specific to VB.NET versions 2008, 2010, 2012, 2013, and 2015. It also includes a wide variety of sample programs.
- Introduction to the Visual Basic Programming Language: Microsoft’s tutorials for VB 2008.
- The Coding Guys Visual Basic Tutorial: a simple introduction to the language.
- Zet Code Visual Basic Tutorial: a detailed tutorial for people new to programming.
You might want to get one or more books about ASP.NET to start, or after you try out a few tutorials. In general, they provide a lot more detail.
Visual Basic Books
- Beginning Visual Basic 2015 by Bryan Newsome: geared toward people who are totally new to programming.
- Learning Visual Basic .NET by Jesse Liberty: an old book, but still an excellent introduction to the Visual Basic programming language.
- Professional Visual Basic 2012 and .NET 4.5 Programming by Sheldon et al: thorough introduction with a number of advanced topics.
Advanced ASP.NET Programming
You will get into more advanced topics the more you learn about ASP.NET as you specialize in different areas that are interesting to you or that you are hired to work on. But there are two ASP.NET extensions that are commonly used.
Normally, server-side code is placed inside of
%> symbols. But with Razor, the server knows to start the code when it sees the
That’s not a great advantage. The great trick with Razor is that it determines when the code is complete. So you can write code that looks more like straight HTML:
At the tone, the date and time will be: @DateTime.Now
ASP.NET MVC is an application framework that implements the model-view-controller (MVC) architectural pattern for ASP.NET. This is an advanced system for designing user interfaces.
As the name implies, the code is divided into three parts. This allows the code for the user interface to be separated from the control code and the data.
- Learn About ASP.NET MVC: introduction to the model-view-controller (MVC) based framework for ASP.NET, which allows you to create well designed and maintainable user interfaces.
- ASP.NET MVC Forum: a very active forum dedicated to MVC.
- ASP.NET MVC Reference: Microsoft’s MVC online reference.
Once you have a basic working knowledge of ASP.NET, you will learn mostly by programming. And this will often involve interacting with other programmers — getting ideas from them and asking questions. There are a number of online communities that focus on ASP.NET.
- Stack Overflow: one of the top tech forums with a lot of knowledgeable ASP.NET developers.
- Reddit .NET SubReddit: it also has SubReddits for C#, Visual Basic, and much more.
- ASP.NET Forums: very active group of forums with categories like Getting Start and MVC.
Most people develop ASP.NET with Microsoft Visual Studio. It provides an excellent integrated development environment (IDE) for editing, testing, and debugging your programs. But there are other tools that can be helpful.
- Alternative IDEs
- Revision Control
ASP.NET is a great development environment to get started with programming because it allows you to gradually work into it.
At the same time, it is almost limitless in terms of the kinds of things that you can do with it; it is unlikely that you will ever outgrow it.
It has the kind of power that is necessary for any application you might find yourself creating. All you have to do is start coding. The future awaits!
Q. Am I limited to C# and Visual Basic for ASP.NET coding?
A. Not at all. ASP.NET supports the Common Language Infrastructure (CLI) specification, and so supports (in theory) any of the dozens of CLI languages.
But you may find it difficult to get COBOL running with ASP.NET. If you stick to C# and Visual Basic, you will always have lots of resources close at hand.
Q. Can I use more than one language in a single ASP.NET program?
A. Any given file must be written in one language. But different files can be written in different languages.
For example, if you need to write a new module for an existing ASP.NET application written in Visual Basic, you could develop the new module in C#. However, Microsoft frowns on this kind of development. And for good reason. Doing so could cause problems for future programmers who have to update the code.
Q. What is the difference between VBScript, Visual Basic, and VB.NET?
A. Visual Basic is short for “Visual Basic .NET,” so it is the same thing as VB.NET.
VBScript was the programming language of the original ASP (not ASP.NET). It has a similar syntax to Visual Basic, but is designed for small jobs.
Now VBScript is used almost exclusively for scripting inside MS-Office applications like Access and Excel.
Q. Can ASP.NET be used on Linux or Mac servers?
A. There are a couple of ways to do this.
Back in 2004, the Mono project was started. It created a C# compiler and a Common Language Runtime. It is still under active development and works well.
In 2014, Microsoft announced ASP.NET vNext — a cross platform development environment. It will be released as part of ASP.NET 5 in 2016.