ASP.NET : Tips, Tutorials and Code


With a foreword by Microsoft's Mark Anders, Professional ASP.NET consists of 19 chapters written by seven of today's leading experts in ASP.NET. These authors are professional developers who create ASP.NET applications, teach, run well-known ASP.NET Web sites, either within or outside of Microsoft. The tutorial framework for each chapter includes:

  • A brief introduction, ...
See more details below
Available through our Marketplace sellers.
Other sellers (Multimedia Set)
  • All (15) from $1.99   
  • New (4) from $16.50   
  • Used (11) from $1.99   
Sort by
Page 1 of 1
Showing All
Note: Marketplace items are not eligible for any coupons and promotions
Seller since 2011

Feedback rating:



New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

"new condition, not use w/cd"

Ships from: Murphy, TX

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
Seller since 2015

Feedback rating:


Condition: New
Brand New Item.

Ships from: Chatham, NJ

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
Seller since 2015

Feedback rating:


Condition: New
Brand new.

Ships from: acton, MA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
Seller since 2015

Feedback rating:


Condition: New
Brand new.

Ships from: acton, MA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
Page 1 of 1
Showing All
Sort by
Sending request ...


With a foreword by Microsoft's Mark Anders, Professional ASP.NET consists of 19 chapters written by seven of today's leading experts in ASP.NET. These authors are professional developers who create ASP.NET applications, teach, run well-known ASP.NET Web sites, either within or outside of Microsoft. The tutorial framework for each chapter includes:

  • A brief introduction, explaining the concept.
  • A code example, illustrating the concept.
  • A piece-by-piece explanation of the code.

Most examples employ VB.NET, but there are also additional C# examples within each chapter, and all of the example programs will be available at the book's web site in both VB.NET and C#.

The code examples in this book are based upon the ASP.NET Beta2 specifications, a functionally complete version of the software.

Read More Show Less

Editorial Reviews

From Barnes & Noble
The Barnes & Noble Review
With ASP, Microsoft delivered an easy, powerful solution for creating dynamic web applications and pages -- and developers responded enthusiastically. Now, Microsoft is reinventing ASP as part of its .NET framework -- and, as Scott Mitchell puts it, "writing ASP.NET pages is an entirely different experience." The transition is likely to be worth the pain. ASP.NET pages are compiled, supercharging performance; the ASP.NET data caching module helps you eliminate pesky data access bottlenecks; ADO+ is way easier to use; apps are easier to deploy; and on, and on.

In ASP.NET: Tips, Tutorials, and Code, Mitchell organizes a team of ASP experts to probe every nook and cranny of ASP.NET. If you're an experienced ASP developer, this book -- based on the feature-complete ASP.NET Beta 2 -- will give you a great headstart on your next-generation web development projects.

Mitchell's team covers everything from form field input validation to error handling, data presentation to XML support. You'll find chapters on debugging; deployment and configuration; security; performance optimization; and separating code from content. You'll also find plenty of code -- mostly VB.NET, some C#, all of it on the CD-ROM, along with the complete ASP.NET beta it's based on.(Bill Camarda)

--Bill Camarda is a consultant, writer, and web/multimedia content developer with nearly 20 years' experience in helping technology companies deploy and market advanced products and services. He served for nearly ten years as vice president of a New Jersey-based marketing company, where he supervised a wide range of graphics and web design projects. His 15 books include Special Edition Using Word 2000.

Read More Show Less

Product Details

  • ISBN-13: 9780672321436
  • Publisher: Sams
  • Publication date: 8/28/2001
  • Series: Sams White Book Series
  • Pages: 878
  • Product dimensions: 7.40 (w) x 9.00 (h) x 1.80 (d)

Meet the Author

Lead author Scott Mitchell is the editor and founder of, one of the largest ASP resource sites on the Web. He has been avidly using and writing about Active Server Pages since January 1998: he's written several hundred ASP-related articles on 4Guys along with authoring numerous beginner-level and advanced level books on Active Server Pages. He is the author of two well-regarded and widely read books on Active Server Pages: Teach Yourself Active Server Pages 3.0 in 21 Days and Designing Active Server Pages. Scott is a passionate developer whose love for ASP and desire to help others are well known among the ASP community.

Stephen Walther is a cofounder of Superexpert. Superexpert offers ASP.NET training to companies and individuals (see, produces ASP.NET controls (see, and offers a community Web site on ASP.NET and other Microsoft Technologies (see He is also very involved with the Seattle ASP.NET Users Group (see He is the author of three books on Active Server Pages: ASP.NET Unleashed, Active Server Pages Unleashed, and Teach Yourself E-Commerce with ASP in 21 Days.

Doug Seven, born and raised in Seattle, WA, is one of the co-founders of the .NET training company, Doug comes to by way of technical roles at Nordstrom, Microsoft and, and as a Training Specialist at Seattle Coffee Company. As the son of a programmer, Doug was destined to become a developer. Growing up around computers, his career began at the tender age of 11 writing "Choose Your Own Adventure" games in BASIC on a TRS-80, (unfortunately none of his groundbreaking work from this period survived). His first professional IT job was as a lead for the long-term data storage and disaster recovery group in a dual-IBM Mainframe environment at Nordstrom. After a seven-year sojourn as a rock star (seriously!), Doug took on the role of Technical Lead in Microsoft's Developer Support group. After leaving Microsoft, Doug worked as a developer in digital certificate enablement technology for before leaving to pursue life running his own company. provides hands-on training in ASP.NET and ADO.NET data access.

Donny Mack, native of Washington State is one of the co-founders of, the training company solely dedicated to ASP.NET and ADO.NET. is also a free online centralized resource website used by .NET developers to feed their .NET passion. Prior to founding with Doug Seven, Mack worked at Microsoft Corporation as a Visual InterDev/ASP Support Professional. Mack's need for bleeding edge technology is such that he spends his waking hours, (and some of his non-waking hours), writing code and developing content for Mack's real enjoyment comes from watching attendants of's training courses walk away as obsessed as he is with .NET.

Chris Payne has had a passion for computers and writing since a young age. He holds a Bachelor of Science in Biomedical Engineering from Boston University and supported himself through college as an independent consultant and writer of technical articles, focused on Web development. Currently making his home in Orlando, Florida with his fiancée, he works as a Web developer and is continuing his career as an author, both of technical and fictional material.

Billy Anders is a technologist whose zest for the dynamic can be seen in his contributions, as a Senior Consultant in the Advanced Technology Group of Microsoft Consulting Services in Redmond, WA. Over the past several years, Billy has focused on applications based on Microsoft technologies for both retail industry and enterprise customers. Billy is committed to teaching, as well as learning exciting, innovative web application programming technologies. While this is his first book project, he has lectured and written numerous articles on a variety of subjects including IIS, SQL Server, ASP and ASP.NET. When not exercising his mind, he exercises his spirit by motorcycling, snowboarding, and countless hours in the gym.

Adam Nathan is a Software Design Engineer on the Microsoft .NET Developer Platform QA team. Adam's focus is the Common Language Runtime-the core of the .NET platform—and its interoperability with COM. For the past two years, he has witnessed and influenced the design decisions that have shaped the product, and thus is able to give a unique perspective when explaining this technology to the reader. Adam has seen the areas of .NET with which programmers frequently struggle, and is armed with plenty of tips and tricks to share.

Dan Wahlin is an independent consultant for Wahlin Consulting and also founded

Read More Show Less

Read an Excerpt

Chapter 3: Form Field Input Validation

In this chapter you will learn
  • How to use the RequiredFieldValidator control
  • How to use the CompareValidator control
  • How to use the RangeValidator control
  • How to use the RegularExpressionValidator control
  • How to use the CustomValidator control
  • How to use the ValidationSummary control
If you're reading this book, you've no doubt created HTML forms to collect information from the users visiting your Web site. For example, if you want to create a form for a user to send feedback to the Webmaster, you might create a form with two text boxes: one for the user's email address (so the Webmaster can reply to the user's feedback), and another for the user's comments.

Unfortunately, HTML controls provide no sort of inherent data validation. That is, when you create a text box with the following code, the user can enter any sort of value, from something valid (such as Mitchell@ASP.NET) to something nonsensical (such as 76!r.2):

Enter your Email Address:<input type="text" name=="txtEmail"> With classic ASP, the developer would have had to create some sort of form-validation routine to ensure that the email address text box contains a valid email address.

The process of creating form-validation routines for every form on a Web site is both tiresome and error prone. Because no form-validation library shipped with classic ASP, developers were on their own to create their form-validation functions.

Fortunately, with ASP.NET, form validation is a breeze. ASP.NET pages can include validation controls, which are Web controls used to ensure that the entered values in form fields meet developer-defined criteria. In this chapter we will look at how to use these incredibly useful validation controls.

1. Validating Form Field Input with ASP.NET's Validation Controls

To help with form validation, ASP.NET ships with five validation controls (and a ValidationSummary control). Over the next six sections, we'll examine these five controls and the ValidationSummary control, looking at how they can be used to provide extensive form validation with just a few lines of code!

Before we delve into the validation controls, let's take a step back and look at fundamentals of form validation. Form validation can take one of two forms:

  • Client-side form validation
  • Server-side form validation
In client-side form validation, the HTML page contains client-side JavaScript code that is exe-cuted on the client's Web browser. This code is usually executed when the user attempts to submit a form: If the form fields are valid, the form submits; otherwise, the user is usually shown some message regarding his invalid form information. The nice thing about client-side form validation is that it executes entirely on the client's machine and doesn't require a roundtrip to the Web server. It can be used, then, to quickly detect any validation errors and alert the user of such errors. Client-side form validation has its downsides, though. For starters, it requires that the visitor be able to execute client-side JavaScript code on his browser. Some older browsers don't have this feature, and some Web surfers explicitly turn off JavaScript support in their Web browsers.

Server-side form validation, on the other hand, takes place after the user submits the form but before any action is done on the submitted data. The main advantage of server-side form vali-dation is that it will work regardless of the user's browser or browser configuration. Additionally, clever visitors can easily bypass any sort of client-side form validation. With server-side form validation, however, it is impossible for users to circumvent the validation process altogether.

When developing forms in classic ASP, developers were highly encouraged to use both client-side and server-side form validation because both have advantages. In my experiences, I found that most classic ASP developers just used server-side form validation (if any form validation at all). Using just client-side form validation should be avoided unless your Web application will be used in an environment where you know none of the users to be malicious and you are certain that they are all using modern browsers with client-side scripting features enabled.

The ASP.NET validation controls always use server-side form validation. However, if the user's browser can support DHTML features, client-side form validation is automatically included as well!

You can explicitly specify that the validation controls should never use client-side form validation on a page-by-page basis. Simply set the ClientTarget property to Downlevel using the @Page directive at the top of your ASP.NET page:

<%@Page ClientTarget="Downlevel " %%>

This will cause all the validation controls on the Web page to not use client-side form validation, regardless of the visitor's browser. Unfortunately you cannot specify client-side form validation on a validation control–by–validation control basis.

Again, regardless of whether client-side form validation is used, server-side form validation will always be employed by the ASP.NET validation controls.

2. Using the RequiredFieldValidator Control

The RequiredFieldValidator control, as its name implies, is useful when you have a form field that the user must enter before she can successfully submit the form.

There are many situations in which a form field requires an entry before processing can continue. For example, many Web sites have a “members-only" area, where a visitor must supply his username and password to proceed to a particular area of the Web site. With such a login form, both the username and password fields would be required fields. Listing 3.2.1 contains the code for an ASP.NET page that, when first loaded, presents the user with two text boxes for her username and password.

Listing 3.2.1 Using a RequiredFieldValidator Control Ensures That the User Enters a Value for a Form Field

1:<script language="vb " runat=="server ">
2:Sub Page_Load(sender as Object,e as EventArgs)
3:If Page.IsPostBack then
4:‘ The User has submitted the form..Is it valid?
5:If Page.IsValid then
6:‘ Yes it is,,check to make sure password/username are valid
7:‘ Then do whatever you intended on doing if they're login
8:‘ credentials were ((or were not)valid.
10:‘ The page is not valid,,meaning they either didn't enter
11:‘ the username or password
12:Response.Write(“You must enter both the username and password.")
13:End If
14:End If
15:End Sub
20:<form method="post " runat=="server ">
22:<asp:textbox runat="server " id=="txtUserName " //>
23:<!--Create a RequiredFieldValidator Control for txtUserName -->
24:<asp:RequiredFieldValidator runat="server "
25:id="reqUserName " ControlToValidate=="txtUserName "
26:Display="Dynamic ">
27:Enter your UserName!
31:<asp:textbox runat="server " id=="txtPassword " TextMode=="Password " //>
32:<!--Create a RequiredFieldValidator Control for txtPassword -->
33:<asp:RequiredFieldValidator runat="server "
34:id="reqPassword " ControlToValidate=="txtPassword "
35:Display="Dynamic ">
36:Enter your Password!
39:<p><asp:button runat="server " id=="btnSubmit " Text=="Login!" //>

Let's begin our examination of Listing 3.2.1 at line 18, where the HTML section begins. On line 20, a postback form is created. On line 22, a text box, txtUserName, is created for the visi-tor to enter her username into. Next, a RequiredFieldValidator control is created (lines 24 through 26)....

Read More Show Less

Table of Contents

Foreword 1
Introduction 3
Ch. 1 Common ASP.NET Page Techniques 7
Ch. 2 Common ASP.NET Code Techniques 29
Ch. 3 Form Field Input Validation 123
Ch. 4 Enabling Better Browser Support 155
Ch. 5 Creating and Using User Controls 171
Ch. 6 Data Manipulation with ADO.NET 195
Ch. 7 Data Presentation 233
Ch. 8 Using XML 303
Ch. 9 ASP.NET Error Handling Techniques 347
Ch. 10 Debugging ASP.NET Applications 379
Ch. 11 ASP.NET Deployment and Configuration 399
Ch. 12 Security with ASP.NET 433
Ch. 13 Web Services 489
Ch. 14 Managing State 529
Ch. 15 ASP.NET Performance Tips 555
Ch. 16 Separating Code from Content 595
Ch. 17 Mobile Controls 627
Ch. 18 ASP.NET Http Runtime 675
Ch. 19 COM and Win32 in ASP.NET Web Pages 739
App. A Upgrading to Visual Basic.NET 815
App. B: Commonly Used Regular Expression Templates 823
App. C: Commonly Used Stored Procedure Templates 829
Index 839
Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star


4 Star


3 Star


2 Star


1 Star


Your Rating:

Your Name: Create a Pen Name or

Barnes & Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation


  • - By submitting a review, you grant to Barnes & and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Terms of Use.
  • - Barnes & reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing all of 3 Customer Reviews
  • Anonymous

    Posted April 24, 2002

    A Great Reference Book

    If you are looking for the basics and ready to move forward this is the Book.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted January 29, 2002

    Way to .net

    Good book for beginners.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted September 29, 2001

    Sample Code Galore

    This book was written with the everyday developer and everyday problem in mind. Things such as graphics on the web, securing a web application, deploying a web application, User Controls, and much much more are covered. There is much more than just great souce code. Many of the authors are well known corporate trainers who have worked in the 'real world' and understand what developers need to solve 'real world' problems. As a result of their teaching experience, the explanations in this book are top notch. I don't think I have ever read a book that was so easy to read and so applicable to my everyday development. My entire development team has purchased it and if you are an intermediate to advanced ASP developer then I highly suggest you get yourself a copy.

    Was this review helpful? Yes  No   Report this review
Sort by: Showing all of 3 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)