This book is for anyone who wants to learn how to build rich and interactive web sites that run on the Microsoft platform. With the knowledge you gain from this book, you create a great foundation to build any type of web site, ranging from simple hobby-related web sites to sites you may be creating for commercial purposes.
Anyone new to web programming should be able to follow along because no prior background in web development is assumed although it helps if you do have a basic understanding of HTML and the web in general. The book starts at the very beginning of web development by showing you how to obtain and install Visual Web Developer. The chapters that follow gradually introduce you to new technologies, building on top of the knowledge gained in the previous chapters.
Do you have a strong preference for Visual Basic over C# or the other way around? Or do you think both languages are equally cool? Or maybe you haven't made up your mind yet and want to learn both languages? Either way, you'll like this book because all code examples are presented in both languages!
Even if you have some experience with prior versions of ASP.NET, you may gain a lot from this book. Although many concepts from previous versions are brought forward into ASP.NET 4, you'll discover there's a lot of new stuff to be found in this book, including an introduction to the ADO.NET Entity Framework, the inclusion of jQuery, ASP.NET AJAX, the many changes to the ASP.NET 4 Framework, and much more.
This book teaches you how to create a feature-rich, data-driven, and interactive web site called Planet Wrox. Although this is quite a mouthful, you'll find that with Visual Web Developer 2010, developing such a web site isn't as hard as it seems. You'll see the entire process of building a web site, from installing Visual Web Developer 2010 in Chapter 1 all the way up to putting your web application on a live server in Chapter 19. The book is divided into 19 chapters, each dealing with a specific subject.
Chapter 1, "Getting Started with ASP.NET 4" shows you how to obtain and install Visual Web Developer 2010. You'll get instructions for downloading and installing the free edition of Visual Web Developer 2010, called the Express edition. You are also introduced to HTML, the language behind every web page. The chapter closes with an overview of the customization options that Visual Web Developer gives you.
Chapter 2, "Building an ASP.NET Web Site" shows you how to create a new web site and how to add new elements like pages to it. Besides learning how to create a well-structured site, you also see how to use the numerous tools in Visual Web Developer to create HTML and ASP.NET pages.
Chapter 3, "Designing Your Web Pages." Visual Web Developer comes with a host of tools that allow you to create well-designed and attractive web pages. In this chapter, you see how to make good use of these tools. Additionally, you learn about CSS, the language that is used to format web pages.
Chapter 4, "Working with ASP.NET Server Controls." ASP.NET Server Controls are one of the most important concepts in ASP.NET. They allow you to create complex and feature-rich web sites with very little code. This chapter introduces you to the large number of server controls that are available, explains what they are used for, and shows you how to use them.
Chapter 5, "Programming Your ASP.NET Web Pages." Although the built-in CSS tools and the ASP.NET Server Controls can get you a long way in creating web pages, you are likely to use a programming language to enhance your pages. This chapter serves as an introduction to programming with a strong focus on programming web pages. Best of all: all the examples you see in this chapter (and the rest of the book) are in both Visual Basic and C#, so you can choose the language you like best.
Chapter 6, "Creating Consistent Looking Web Sites." ASP.NET helps you create consistent-looking pages through the use of master pages, which allow you to define the global look and feel of a page. Skins and themes help you to centralize the looks of controls and other visual elements in your site. You also see how to create a base page that helps to centralize programming code that you need on all pages in your site.
Chapter 7, "Navigation." To help your visitors find their way around your site, ASP.NET comes with a number of navigation controls. These controls are used to build the navigation structure of your site. They can be connected to your site's central site map that defines the pages in your web site. You also learn how to programmatically send users from one page to another.
Chapter 8, "User Controls." User controls are reusable page fragments that can be used in multiple web pages. As such, they are great for repeating content such as menus, banners, and so on. In this chapter, you learn how to create and use user controls and enhance them with some programmatic intelligence.
Chapter 9, "Validating User Input." A large part of interactivity in your site is defined by the input of your users. This chapter shows you how to accept, validate, and process user input using ASP.NET Server Controls. Additionally, you see how to send e-mail from your ASP.NET web application and how to read from text files.
Chapter 10, "ASP.NET AJAX." Microsoft ASP.NET AJAX allows you to create good-looking, flicker-free web pages that close the gap between traditional desktop applications and web applications. In this chapter you learn how to use the built-in Ajax features to enhance the presence of your web pages, resulting in a smoother interaction with the web site.
Chapter 12, "Introducing Databases." Understanding how to use a database is critical to building web sites, as most modern web sites require the use of a database. You'll learn the basics of SQL, the query language that allows you to access and alter data in a database. In addition, you are introduced to the database tools found in Visual Web Developer that help you create and manage your SQL Server databases.
Chapter 13, "Displaying and Updating Data." Building on the knowledge you gained in the previous chapter, this chapter shows you how to use the ASP.NET data-bound and data source controls to create a rich interface that enables your users to interact with the data in the database that these controls target.
Chapter 14, "LINQ and the ADO.NET Entity Framework." LINQ is Microsoft's solution for accessing objects, databases, XML, and more. The ADO.NET Entity Framework (EF) is Microsoft's new technology for database access. This chapter shows you what LINQ is all about, how to use the visual EF designer built into Visual Studio, and how to write LINQ to EF queries to get data in and out of your SQL Server database.
Chapter 15, "Working with Data—Advanced Topics." While earlier chapters focused mostly on the technical foundations of working with data, this chapter looks at the same topic from a front-end perspective. You see how to change the visual appearance of your data through the use of control styles. You also see how to interact with the data-bound controls and how to speed up your application by keeping a local copy of frequently accessed data.
Chapter 16, "Security in Your ASP.NET 4 Web Site." Although presented quite late in the book, security is a first-class, important topic. This chapter shows you how to make use of the built-in ASP.NET features related to security. You learn about a number of application services that facilitate security. You also learn how to let users sign up for an account on your web site, how to distinguish between anonymous and logged-on users, and how to manage the users in your system.
Chapter 17, "Personalizing Web Sites." Building on the security features introduced in Chapter 16, this chapter shows you how to create personalized web pages with content targeted at individual users. You see how to configure and use ASP.NET Profile that enables you to store personalized data for known and anonymous visitors.
Chapter 18, "Exception Handling, Debugging, and Tracing." In order to understand, improve, and fix the code you write for your ASP.NET web pages you need good debugging tools. Visual Web Developer ships with great debugging support that enables you to diagnose the state of your application at run time, helping you find and fix problems before your users do.
Chapter 19, "Deploying Your Web Site." By the end of the book, you should have a web site that is ready to be shown to the world. But how exactly do you do that? What are the things you need to know and understand to put your web site out in the wild? This chapter gives the answers and provides you with a good look at configuring different production systems in order to run your final web site.
Note: CD-ROM/DVD and other supplementary materials are not included as part of eBook file.