Read Build Your Own ASP.NET 3.5 Website Using C# & VB Online
Authors: Cristian Darie,Zak Ruvalcaba,Wyatt Barnett
Tags: #C♯ (Computer program language), #Active server pages, #Programming Languages, #C#, #Web Page Design, #Computers, #Web site development, #internet programming, #General, #C? (Computer program language), #Internet, #Visual BASIC, #Microsoft Visual BASIC, #Application Development, #Microsoft .NET Framework
xxix
Tips, Notes, and Warnings
Hey, You!
Tips will give you helpful little pointers.
Ahem, Excuse Me …
Notes are useful asides that are related—but not critical—to the topic at hand.
Think of them as extra tidbits of information.
Make Sure You Always …
… pay attention to these important points.
Watch Out!
Warnings will highlight any gotchas that are likely to trip you up along the way.
Acknowledgments
I'd like to thank the SitePoint team, and especially Andrew Tetlaw, for being extremely supportive during the process of writing this book.
—Cristian Darie
Licensed to [email protected]
Licensed to [email protected]
Introducing ASP.NET and
the .NET Platform
ASP.NET is one of the most exciting web development technologies on offer today.
When Microsoft released the first version in 2002, many web developers thought
all their dreams had come true. Here was a powerful platform with lots of built-in
functionality, astonishing performance levels, and one of the best IDEs (Integrated
Development Environments) around: Visual Studio. What more could anyone want?
Indeed, ASP.NET showed the way for the faster, easier, and more disciplined development of dynamic web sites, and the results were impressive. Time has passed, and ASP.NET has grown. ASP.NET 3.5 comes with extraordinary
new features as well as an expanded and more powerful underlying framework.
Not only that, but the basic versions of all development tools, including Visual Web
Developer 2008 Express Edition and SQL Server 2005 Express Edition, are still free!
This book shows you how to use all these technologies together in order to produce
fantastic results. We’ll take you step by step through each task, showing you how
to get the most out of each technology and tool. Let’s begin!
Licensed to [email protected]
2
Build Your Own ASP.NET 3.5 Web Site Using C# & VB
What is ASP.NET?
ASP.NET is a sophisticated and powerful web development framework. If you’ve
never used ASP.NET before, it will likely take you some time and patience to grow
accustomed to it. Development with ASP.NET requires not only an understanding
of HTML and web design, but also a firm grasp of the concepts of object oriented
programming and development. However, we believe you’ll find the benefits amply
reward the learning effort!
In the next few sections, we’ll introduce you to the basics of ASP.NET. We’ll walk
through the process of installing it on your web server, and look at a simple example
that demonstrates how ASP.NET pages are constructed. But first, let’s define what
ASP.NET actually
is
.
ASP.NET is a server-side technology for developing web applications based on the
Microsoft .NET Framework
. Okay, let’s break that jargon-filled sentence down.
ASP.NET is a server-side technology
. That is, it runs on the web server. Most web
designers cut their teeth learning client-side technologies such as HTML, JavaScript,
and Cascading Style Sheets (CSS). When a web browser requests a web page created
with only client-side technologies, the web server simply grabs the files that the
browser (or client) requests and sends them down the line. The client is entirely
responsible for reading the markup in those files and interpreting that markup to
display the page on the screen.
Server-side technologies such as ASP.NET, however, are a different story. Instead
of being interpreted by the client, server-side code (for example, the code in an
ASP.NET page) is interpreted by the web server. In the case of ASP.NET, the code
in the page is read by the server and used to generate the HTML, JavaScript, and
CSS, which is then sent to the browser. Since the processing of the ASP.NET code
occurs on the server, it’s called a server-side technology
. As Figure 1.1
shows, the client only sees the HTML, JavaScript, and CSS. The server is entirely responsible
for processing the server-side code.
Licensed to [email protected]
Introducing ASP.NET and the .NET Platform
3
Figure 1.1. A user interacting with a web application
Note the three roles involved in such a transaction:
user
The transaction starts and ends with the user. The user operates the
web client software and interprets the results.
web client
This is the software program that the person uses to interact with
the web application. The client is usually a web browser, such as
Internet Explorer or Firefox.
web server
This is the software program located on the server. It processes requests made by the web client.
ASP.NET is a technology for developing web applications.
A web application is just
a fancy name for a dynamic web site. Web applications usually (but not always)
store information in a database, and allow visitors to the site to access and change
that information. Many different programming technologies and supported languages
have been developed to create web applications; PHP, JSP, Ruby on Rails, CGI, and
ColdFusion are just a few of the more popular ones. However, rather than tying you
Licensed to [email protected]
4
Build Your Own ASP.NET 3.5 Web Site Using C# & VB
to a specific technology and language, ASP.NET lets you write web applications in
a variety of familiar programming languages.
ASP.NET uses the Microsoft .NET Framework.
The .NET Framework collects all
the technologies needed for building Windows desktop applications, web applications, web services, and so on, into a single package, and makes them available to more than 40 programming languages.
Even with all the jargon explained, you’re probably still wondering what makes
ASP.NET so good. The truth is that there are many server-side technologies around,