Building ASP.NET Pages with Visual Basic.NET and C#
- Introduction to Visual Basic.NET and C#
- Variables
- Arrays
- Operators
- Conditional Logic
- Looping Logic
- Branching Logic
- Classes
- Useful VB.NET Functions
- For Future VB.NET and C# Gurus: Where to Go
- That's Not ASP!
- Summary
- Q&A
- Workshop
For more information on .NET, visit our .NET Reference Guide or sign up for our .NET Newsletter.
In the past two days, you've learned what an ASP.NET page looks like and what its various parts do. You've also gained a solid foundation on the .NET Framework, and now you're going to start learning how to build your own ASP.NET pages using Visual Basic.NET and C#.
Using either of these languages will allow you to build dynamic pages that use all the power of ASP.NET. Today's lesson covers ASP.NET's syntax, general programming structures, and programming methodologies, with examples of each. This is by no means intended to be a complete guide to VB.NET or C#, but it's a good introduction to the concepts you'll need to know in later chapters.
Even if you're familiar with VB.NET or C#, you still need to read today's discussion. It is not simply a primer on the languagesit contains information on working with ASP.NET pages using VB.NET and C#.
Today's lesson will cover the following:
-
An introduction to VB.NET and C#
-
What variables and arrays are
-
What conditional, looping, and branching logic are
-
What functions and subroutines are
-
How to write an event handler
-
What classes are
-
Some useful VB.NET functions for programmers with prior experience
Introduction to Visual Basic.NET and C#
Visual Basic (VB) is a programming language that has been in use for several years. At first VB was used only for building quick application prototypes, but it has grown tremendously throughout its lifetime. Now it's a powerful environment for building all types of full-blown standalone applications.
VB.NET is the latest incarnation of this language, and it's fully supported by the .NET Framework and the CLR. It's one of the most popular languages for ASP.NET development, and best of all, its learning curve isn't very steep. For these reasons, you'll be using VB.NET throughout this book for your ASP.NET pages.
C# (pronounced "see-sharp") is a new programming language from Microsoft that's fully supported by the .NET Framework. Since C# is derived from C++ and C, programmers who are familiar with those languages don't have to bother learning VB.NET to program their ASP.NET pages.
C# also bears a close resemblance to the Java programming language, so even Java developers should feel comfortable moving to this new language.
Many of the concepts covered today will be very similar to the VB.NET concepts. Both VB.NET and C# are powerful languages for ASP.NET development, so you can develop your pages with the language you're most comfortable with.