[ ASP.NET developer? Learn ASP.NET Search Engine Optimization (SEO) techniques. ]
This book will be your gentle introduction to the wonderful world of ASP.NET,
teaching you the foundations step by step. First, you’ll learn the theory; then, you’ll
put it into practice as we work through practical exercises together. To demonstrate some of the more complex functionality, and to put the theory into a cohesive,
realistic context, we’ll develop a project through the course of this book. The project — an intranet site for a company named Dorknozzle —
will allow us to see the many components of .NET in action, and to understand through practice exactly how .NET works in the real world.
Who Should Read This Book?
This book is aimed at beginner, intermediate, and advanced web designers looking to make the leap into server-side programming with ASP.NET.
We expect that you’ll already feel comfortable with HTML and a little CSS, as very little explanation of these topics is provided here.
By the end of this book, you should be able to successfully download and install Visual Web Developer 2008 Express Edition, and use it to create basic ASP.NET
pages. You’ll also learn how to install and run Microsoft SQL Server 2005 Express Edition, create database tables, and work with advanced, dynamic ASP.NET pages
that query, insert, update, and delete information within a database.
All examples provided in the book are written in both Visual Basic and C#, the two most popular languages for creating ASP.NET web sites. The examples start at
beginners’ level and proceed to more advanced levels. As such, no prior knowledge
of either language is required in order to read, understand, learn from, and apply
the knowledge provided in this book. Experience with other programming or
scripting languages (such as JavaScript) will certainly grease the wheels, though,
and should enable you to grasp fundamental programming concepts more quickly.
This book will show you how to:
- Install the free software that you need.
- Use Visual Web Developer.
- Program in both VB and C#.
- Write best practice code and use code-behind.
- Use CSS to style your ASP.NET pages.
- Build a complete web application: the Dorknozzle intranet site.
- Validate input using the Validation Controls.
- Learn database design and SQL using SQL Server Express Edition.
- Manage page content using the GridView and DetailsView controls.
- Secure your applications with Memberships and Roles.
- Work with files and email.
Other Recommended Books
real-world tutorial
|
ASP.NET reference
|
ASP.NET SEO
|
master ADO.NET
|
more C# for you
|
Table of Contents
Chapter 1: Introducing ASP.NET
Before you can start building your database-driven Web presence, you must ensure you have the right tools for the job. In this first chapter, you’ll learn how to find, download, and configure the .NET Framework. You’ll learn where the Web server is located and how to install and configure it. Next, we’ll walk through the installation of the Microsoft database solution: SQL Server 2005. Finally, we’ll create a simple ASP.NET page to make sure that everything’s running and properly configured.
Chapter 2: ASP.NET Basics
Here you’ll create your first useful ASP.NET page. We’ll cover all of the parts that make up a typical ASP.NET page, including directives, controls, and code. We’ll then walk through the process of deployment, focusing specifically on allowing the user to view the processing of a simple ASP.NET page through the Web browser.
Chapter 3: VB.NET and C# Programming Basics
In this chapter, we’ll look at two of the programming languages used to create ASP.NET pages: VB.NET and C#. You’ll learn about the syntax of the two languages as we explore the concepts of variables, data types, conditionals, loops, arrays, functions, and more. Finally, we’ll see how the two languages accommodate Object Oriented Programming (OOP) principles by allowing you to work with classes, methods, properties, inheritance, and more.
Chapter 4: Constructing ASP.NET Web Pages
ASP.NET web pages are known as web forms, but, as you'll see, building ASP.NET Web Forms is a lot like composing a castle with Lego bricks! ASP.NET is bundled with hundreds of controls - including HTML controls, Web controls, and so on - that are designed for easy deployment within your applications. This chapter will introduce you to these building blocks. You’ll also learn your own Web User Controls, and how to work with Master Pages, which are a very exciting new feature in ASP.NET 2.0.
Chapter 5: Building Web Applications
A Web Application is basically a group of Web Forms, controls, and other elements, that work together to achieve complex functionality. So it's no surprise than when building Web Applications, there are more things to consider than when building individual Web Forms. This chapter touches on those topics, beginning with a hands-on tour of the free IDE from Microsoft, called Visual Web Developer 2005 Express Edition. Then, you'll learn how to configure your Web Application the Web.config configuration file, how to use the application state, user sessions and cookies, how to debug your project, and more.
Chapter 6: Using the Validation Controls
This chapter introduces validation controls. With validation controls, Microsoft basically eliminated the heartache of fumbling through and configuring tired, reused client-side validation scripts.
Chapter 7: Database Design and Development
Undoubtedly one of the most important chapters in the book, Chapter 7, Database Design and Development will help you prepare to work with databases in ASP.NET. We’ll cover the essentials you’ll need in order to create a database using SQL Server 2005 Express Edition. Also in this chapter, we’ll begin to build the database the Dorknozzle intranet project.
Chapter 8: Speaking SQL
This chapter will teach you to speak the language of the database: Structured Query Language, or SQL. After a gentle introduction to the basic concepts of SQL, we’ll move on to more advanced topics such as expressions, conditions, and joins. Finally, we'll take a look at how we can reuse queries quickly by writing stored procedures.
Chapter 9: ADO.NET
The next logical step in building database driven Web applications involves learning ADO.NET, the technology that facilitates communication between your Web Application and the SQL database server. This chapter explores the essentials of the technology, and will have you reading data in a database directly from your Web applications in just a few short steps. We’ll then help you begin the transition from working with static applications to those that are database-driven.
Chapter 10: Displaying Content Using Data Lists
Taking ADO.NET further, this chapter shows you how to utilize the DataList control provided within the .NET Framework. DataList plays a crucial role in simplifying the presentation of information with ASP.NET. In learning how to present database data within your applications in a cleaner and more legible format, you’ll gain an understanding of the concept of data binding at a higher level.
Chapter 11: Managing Content Using GridView and DetailsView
This chapter explores two of the most powerful data presentation controls of ASP.NET: GridView and DetailsView. GridView supersedes the ASP.NET 1.x’s DataGrid, and is a very complex control which automates almost all tasks that involve displaying grids of data. DetailsView completes the picture by offering us the functionality needed to display the details of a single grid item.
Chapter 12: Advanced Data Access
This chapter explores a few of the more advanced details involving data access, retrieval, and manipulation. We'll start by looking at direct data access using ADO.NET's data source controls. We'll then compare this approach with that of using data sets to access data in a disconnected fashion. In this section, you'll learn how to implement features such as paging, filtering, and sorting using custom code.
Chapter 13: Security and User Authentication
This chapter will show you how to secure your ASP.NET Web applications. We’ll discuss the various security models available, including IIS, Forms, Windows, and Passport, and explore the roles that the Web.config and XML files can play. This chapter will also introduce you to the new ASP.NET 2.0 membership model, and the new ASP.NET 2.0 login controls.
Chapter 14: Working with Files and Email
In this chapter, we’ll look at the task of accessing your server’s file system, including drives, files, and the network. The chapter will then show you how to work with file streams to create text files, write to text files, and read from text files on your Web server. Finally, you’ll learn how to send emails using ASP.NET.
Chapter 15: ASP.NET AJAX
In our final chapter, you’ll learn all about the Ajax features that are built into ASP.NET 3.5. We’ll spice up the Dorknozzle project with a few Ajax features
that’ll show how simple ASP.NET AJAX is to use. We’ll also explore the ASP.NET AJAX Control Toolkit and see how it can enhance existing features.
Appendix A: Web Control Reference
Included in this book is a handy web control reference, which lists the most common properties and methods of the most frequently used controls in ASP.NET, starting with the base class WebControl. Many of the new ASP.NET 2.0 controls are covered.
Standard Web Controls: AdRotator, BulletedList, Button, Calendar, CheckBox, CheckBoxList, DropDownList, FileUpload, HiddenField, HyperLink, Image, ImageButton, ImageMap, Label, LinkButton, ListBox, Literal, MultiView, Panel, PlaceHolder, RadioButton, RadioButtonList, TextBox, Xml.
Validation Controls: CompareValidator, CustomValidator, RangeValidator, RegularExpressionValidator, RequiredFieldValidator, ValidationSummary.
Navigation Web Controls: SiteMapPath, Menu, TreeView.
HTML ServerControls: HtmlAnchor, HtmlButton, HtmlForm, HtmlGeneric, HtmlImage, HtmlInputButton, HtmlInputCheckBox, HtmlInputFile, HtmlInputHidden, HtmlInputImage, HtmlInputRadionButton, HtmlInputText, HtmlSelect, HtmlTable, HtmlTableCell, HtmlTableRow, HtmlTextArea.
Appendix B: Deploying ASP.NET Web Sites
This appendix will show you, step by step, how to use Visual Web Developer
and to move your web site from your development environment to a web hosting
service and make it live on the Internet. It also covers tips for choosing a reliable
web host, ASP.NET deployment gotchas, and hints for using the SQL Server Hosting Toolkit to migrate your database.