VB and C# Programming Basics
3
As you learned at the end of the last chapter, one of the great things about using
ASP.NET is that we can pick and choose which of the various .NET languages
we like. In this chapter, well look at the key programming principles that will
underpin our use of Visual Basic and C#. Well start by discussing some basic
concepts of programming ASP.NET web applications using these two languages.
Well explore programming fundamentals such as variables, arrays, functions,
operators, conditionals, loops, and events, and work through a quick introduction
to object oriented programming (OOP). Next, well dive into namespaces and
address the topic of classesseeing how theyre exposed through namespaces,
and which ones youll use most often.
The final sections of the chapter cover some of the ideas underlying modern, ef-
fective ASP.NET design, including code-behind and the value it provides by
helping us separate code from presentation. We finish with an examination of
how object oriented programming techniques impact the ASP.NET developer.
Programming Basics
One of the building blocks of an ASP.NET page is the application logic: the ac-
tual programming code that allows the page to function. To get anywhere with
ASP.NET, you need to grasp the concept of events. All ASP.NET pages will
contain controls such as text boxes, checkboxes, and lists. Each of these controls

Get Build Your Own ASP.NET 2.0 Web Site Using C# & VB, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.