BN.com Gift Guide

Beginning ASP.NET 1.1 with Visual C# .Net 2003

Overview

What is this book about?

This hands-on guide teaches you how to build custom ASP.NET Web sites from the ground up. An expert team of authors uses their extensive ASP.NET programming experience to give you hands-on instruction in the best way to create Web sites with ASP.NET and C#. This completely updated edition features new examples, and all code is written and tested for ...

See more details below
Available through our Marketplace sellers.
Other sellers (Paperback)
  • All (17) from $1.99   
  • New (7) from $3.74   
  • Used (10) from $1.99   
Close
Sort by
Page 1 of 1
Showing All
Note: Marketplace items are not eligible for any BN.com coupons and promotions
$3.74
Seller since 2009

Feedback rating:

(116)

Condition:

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
New BRAND NEW CONDITION SHIPS IN 24 HRS.

Ships from: Miami, FL

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$3.85
Seller since 2014

Feedback rating:

(11)

Condition: New
BRAND NEW CONDITION SHIPS IN 24 HRS

Ships from: MIAMI, FL

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$8.43
Seller since 2010

Feedback rating:

(1853)

Condition: New
0764557084 Has stickers on cover. Otherwise in new condition. We are a tested and proven company with over 900,000 satisfied customers since 1997. We ship daily M-F. Choose ... expedited shipping (if available) for much faster delivery. Delivery confirmation on all US orders. Read more Show Less

Ships from: Nashua, NH

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$11.98
Seller since 2008

Feedback rating:

(172)

Condition: New
0764557084 BRAND NEW NEVER USED IN STOCK 125,000+ HAPPY CUSTOMERS SHIP EVERY DAY WITH FREE TRACKING NUMBER

Ships from: fallbrook, CA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
$12.16
Seller since 2005

Feedback rating:

(808)

Condition: New
2004 Paperback New Tracking provided on most orders.

Ships from: Grand Rapids, MI

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$16.50
Seller since 2011

Feedback rating:

(4)

Condition: New
new condition not used

Ships from: Murphy, TX

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
$33.98
Seller since 2008

Feedback rating:

(283)

Condition: New
0764557084 New item in stock, may show minimal wear from storage. I ship daily and provide tracking! 100% Money Back Guarantee!

Ships from: FORT MYERS, FL

Usually ships in 1-2 business days

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

Overview

What is this book about?

This hands-on guide teaches you how to build custom ASP.NET Web sites from the ground up. An expert team of authors uses their extensive ASP.NET programming experience to give you hands-on instruction in the best way to create Web sites with ASP.NET and C#. This completely updated edition features new examples, and all code is written and tested for ASP.NET version 1.1.

What does this book cover?

Here are some details on what you'll discover in this book:

  • Fast ASP.NET site construction using Microsoft’s new, free Web Matrix tool
  • How to install and configure ASP.NET
  • Basic programming principles for C#, such as variables, control structures, and procedural programming
  • Techniques for applying these principles as you develop ASP.NET pages
  • The minimum amount of object-oriented programming necessary to work successfully and efficiently with ASP.NET
  • Key differences between ASP.NET 1.0 and 1.1, how to use the examples in this book with either version, and how to move from 1.0 to 1.1
  • Techniques for extending your ASP.NET sites to incorporate related tools and technologies, such as using ADO.NET for data source access, Web Services for inter-site communication, and Server Controls to facilitate code maintenance and reuse
  • How you can make your ASP.NET site production-ready through proper debugging, optimization, and security

Who is this book for?

This book is for beginners who have no previous experience with ASP, C#, XML, object-oriented programming, or the .NET framework. A little knowledge of HTML is useful, but not essential. All the concepts you need to create dynamic ASP.NET Web sites are presented and explained in full.

Read More Show Less

Product Details

  • ISBN-13: 9780764557088
  • Publisher: Wiley
  • Publication date: 3/22/2004
  • Edition number: 1
  • Pages: 888
  • Product dimensions: 7.38 (w) x 9.24 (h) x 1.68 (d)

Meet the Author

Chris Ullman is a freelance Web developer and technical author who has spent many years stewing in ASP/ASP.NET, like a teabag left too long in the pot. Coming from a Computer Science background, he started initially as a UNIX/Linux guru, who gravitated towards MS technologies during the summer of ASP (1997). He cut his teeth on Wrox Press ASP guides, and since then he has written over 20 books, most notably as lead author for Wrox's bestselling Beginning ASP/ASP.NET series, and has contributed chapters to books on PHP, ColdFusion, JavaScript, Web Services, C#, XML and other Internet-related technologies too esoteric to mention, now swallowed up in the quicksands of the dot.com boom.
Quitting Wrox as a full-time employee in August 2001, he branched out into VB6 programming and ASP development, maintaining a multitude of sites from http://www.cuasp.co.co.uk, his "work" site, to http://www.atomicwise.com, a selection of his writings on music and art. He now divides his time between being a human punchbag for his 29-month-old son Nye, composing electronic sounds on bits of dilapidated old keyboards for his music project Open E, and tutoring his cats in the art of peaceful co-existence, and not violently mugging each other on the stairs.
Chris Ullman contributed Chapters 1, 14, 15, 16, 17, and Appendix E to this book.

John Kauffman was born in Philadelphia, the son of a chemist and a nurse. He received his degrees from The Pennsylvania State University, the colleges of Science and Agriculture. His early research was for Hershey foods in the genetics of the chocolate tree and the molecular biology of chocolate production. Subsequently, he moved to the Rockefeller University, where he cloned and sequenced DNA regions that control the day and night cycles of plants.
Since 1997, John has written ten books, six of which have been on the Amazon Computer Best Seller List. His specialty is programming Web front-ends for enterprise-level databases.
In his spare time, John is an avid sailor and youth sailing coach. He represented the USA in the sailing World Championship of 1985 and assisted the Olympic teams of Belgium and China in 1996. He also enjoys jazz music and drumming and manages to read the New Yorker from cover-to-cover each week.
John Kauffman contributed Chapters 2, 3, 4, 5, 6, and Appendix B to this book.

Chris Hart is a full-time .NET Developer and part-time author who lives in Birmingham (UK) with her husband James. While she's most at home in the world of the Web, she's recently been working with the .NET Compact Framework. In her spare time, Chris spends much of her time playing with beta technologies, and then attempting to write about them.
Chris has contributed many chapters to a variety of books, including Beginning ASP.NET (Wrox Press), Beginning Dynamic Websites with ASP.NET Web Matrix (Wrox Press), and most recently, A Programmer's Guide to SQL (Apress).
When she gets away from computers, Chris enjoys travel, especially when it involves driving along narrow winding roads to get to out-of-the-way parts of Scotland. She dreams of building her own house somewhere where she can keep a cat.
Chris Hart contributed Chapters 10, 11, 12, 13, and Appendices C and D to this book.

Dave Sussman is a writer, trainer, and consultant, living in the wilds of the Oxfordshire countryside. He's been working with ASP.NET since before it was first released and still isn't bored with it. You can contact him at davids@ipona.com.
Dave Sussman contributed Chapters 7, 8, and 9 to this book.

Dan Maharry is a freelance writer, reviewer, speaker, and editor who has, in no particular order, taught English, Math, and Guitar, directed, crewed, acted in, and produced several plays and short films, been a film and music columnist for four years, co-founded ASPToday.com, rewritten his own at HMobius.com several times, opened an office in India, variously edited, reviewed, and written pieces of over 40 programming books, qualified as a sound engineer, and consumed enough caffeine in his lifetime to keep most of China awake for a week. Occasionally, he sleeps. Sometimes. Contact him at danm@hmobius.com.
Dan Maharry contributed Chapters 5 and 6 to this book.

Read More Show Less

Table of Contents

Introduction.

Chapter 1: Getting Started with ASP.NET.

Chapter 2: Anatomy of an ASP.NET Page.

Chapter 3: Server Controls and Variables.

Chapter 4: Control Structures and Procedural Programming.

Chapter 5: Functions.

Chapter 6: Event-Driven Programming and Postback.

Chapter 7: Objects.

Chapter 8: Reading from Databases.

Chapter 9: Advanced Data Handling.

Chapter 10: ASP.NET Server Controls.

Chapter 11: Users and Applications.

Chapter 12: Reusable Code for ASP.NET.

Chapter 13: .NET Assemblies and Custom Controls.

Chapter 14: Debugging and Error Handling.

Chapter 15: Configuration and Optimization.

Chapter 16: Web Services.

Chapter 17: ASP.NET Security.

Appendix A: Exercise Solutions.

Appendix B: Web Matrix Quick Start.

Appendix C: The Wrox United Database.

Appendix D: Web Application Development Using Visual Studio .NET.

Appendix E: Installing and Configuring IIS.

Index.

Read More Show Less

First Chapter

Beginning ASP.NET 1.1 with Visual C# .NET 2003


By Chris Ullman John Kauffman Chris Hart Dave Sussman Daniel Maharry

John Wiley & Sons

ISBN: 0-7645-5708-4


Chapter One

Reading from Databases

So far, you've learnt a lot about programming, and seen those techniques in use in a variety of Web pages. Now it's time to turn our attention to one of the most important topics of building Web sites - data. Whatever the type of site you aim to build, data plays an important part. From a personal site (perhaps a vacation diary or a photo album), to a corporate e-commerce site, data is key!

There are numerous ways to store data, but most sites use a database. In this chapter, we're going to look at data stored in databases, and show how easily it can be used on Web pages. For this we are going to use ADO.NET, which is the data access technology that comes as part of the .NET Framework.

If the thought of databases sounds complex and scary, don't worry. We're going to show you just how easy this can be. In particular, we'll be looking at:

Basics of databases and how they work

How to create simple data pages using Web Matrix

Different ADO.NET classes used for fetching data

Basics of ADO.NET and how it fetches data

How to use Web Matrix to simplify developing data access pages

Let's develop some basic understanding of databases first.

Understanding Databases

Understanding some basics about databases is crucial to using data in your pages. You don't need to be a database expert, but there are certain things you will need to know in order to work with data in .NET. For a start, you need to understand how data is stored. All types of data on a computer are stored in files of some sort. Text files, for example, are simple files and just contain plain text. Spreadsheets, on the other hand, are complex files containing not only the entered text and numbers, but also details about the data, such as what the columns contain, how they are formatted, and so on.

Databases also fall into the category of complex files. When using Microsoft Access, you have an MDB file - this is a database file, but you can't tell anything about the data from the file itself. You need a way to get to the data, either using Microsoft Access itself, or as we are going to do, using the .NET data classes. Before you can access the data, you need to know how it is stored internally.

Tables

Within a database, data is stored in tables - these are the key components of all databases. A table is like a spreadsheet, with rows and columns. You generally have multiple tables for multiple things - each distinct type of data is stored separately, and tables are often linked together.

Let's look at an example that should make this easier to visualize. Consider an ordering system, for example, where you store details of customers and the goods they've ordered. The following table shows rows of customer orders, with columns (or fields) each piece of order information:

Customer Address Order Date Order Item Quantity Item Cost

John 15 High 01/07/2003 Widget 10 3.50 Street Brumingham England UK

John 15 High 01/07/2003 Doodad 5 2.95 Street Brumingham England UK

John 15 High 01/08/2003 Thingy 1 15.98 Street Brumingham England UK

Chris 25 Easterly 01/08/2003 Widget 1 3.50 Way Cradiff Wales UK

Dave 2 Middle 01/09/2003 Doodad 2 2.95 Lane Oxborough England UK

Dave 3 Middle 01/09/2003 Thingamajig 1 8.50 Lane Oxborough England UK

This is the sort of thing you'd see in a spreadsheet, but there are a couple of big problems with this. For a start, we have repeated information. John, for example, has his address shown three times. What happens if he moves house? You'd have to change the address everywhere it occurs. Dave has two addresses, but notice they are slightly different. Which one is correct? Are neither correct?

To get around these problems, we use a process called Normalization.

Normalization

This is the process of separating repeated information into separate tables. There are whole books dedicated to database design, but we only need to look at the simplest case. A good beginner book on database design is Database Design for Mere Mortals: A Hands On Guide to Relational Database Design, by Michael J. Hernandez

What we need to do is split the previous table into three tables, one for each unique piece of information - Customers, Orders, and OrderDetails. To link the three new tables together, we create ID columns that uniquely identify each row. For example, we could create a column called CustomerID in the Customers table. To link the Customers table to the Orders table, we also add this CustomerID to the Orders table. Let's look at our tables now.

The Customers table is as follows:

CustomerID Customer Address

1 John 15 High Street Brumingham England UK

2 Chris 25 Easterly Way Cradiff Wales UK

3 Dave 2 Middle Lane Oxborough England UK

The Orders table is as follows:

OrderID CustomerID OrderDate

1 1 01/07/2003

2 1 01/08/2003

3 2 01/08/2003

4 3 01/09/2003

The OrderDetails table is as follows:

OrderDetailsID OrderID Order Item Quantity Item Cost

1 1 Widget 10 3.50

2 1 Doodad 5 2.95

3 2 Thingy 1 15.98

4 3 Widget 1 3.50

5 4 Doodad 2 2.95

6 4 Thingamajig 1 8.50

We now have three tables that can be linked together by their ID fields as shown in Figure 8-1:

We now have links between the tables. The CustomerID field in the Orders table is used to identify which customer the order is for. Similarly, the OrderID field in the OrderDetails table identifies which order a particular order line belongs to.

The unique key in a table is defined as its Primary Key - it's what uniquely defines a row. When used in another table it is called the Foreign Key, so called because it's a key, but one to a foreign table. The foreign key is simply a column that is the primary key in another table. Because the values of the primary key and the foreign key will be the same, we can use them to link the tables together. This linking of the tables is done in Structured Query Language (SQL), usually as a query or a stored procedure.

SQL and Stored Procedures

Queries are the way in which we deal with data in a database, either to extract data or to manipulate it. We can use an SQL statement or a stored procedure, which is an SQL statement wrapped to provide a simple name. It's worth noting that a stored procedure is actually more than just wrapping an SQL statement in a name, but that's a good enough description for what we need.

In Chapter 5 when we looked at functions, we had a function name encapsulating some code statements. Think of a stored procedure in a similar way - it wraps a set of SQL statements, allowing us to use the name of the stored procedure to run those SQL statements. We're not going to focus much on this topic as it's outside the scope of this book.

To learn more about SQL, read SQL for Dummies (ISBN 0-7645-4075-0) by John Wiley & Sons Inc.

Here are a few reasons why you should always use stored procedures instead of direct SQL:

Security: Using the .NET data classes with stored procedures protects you against certain forms of hacking.

Speed: Stored procedures are optimised the first time they are called, and then the optimised code is used in subsequent calls.

Separation: It keeps the SQL separate from your code.

In the remainder of this book, we'll actually be using a mixture of SQL and stored procedures for the simple reason that sometimes it's easier to use SQL in the context of an example. Remember, our focus is on ASP.NET. We'll be using Microsoft Access for the samples, and although Access doesn't support stored procedures, its use of stored queries is equivalent.

Let's get on with some examples.

The Web Matrix Data Explorer

You've already seen how powerful Web Matrix is for creating Web pages, and this power extends to working with data. Where you've used the Workspace Explorer in the top right hand corner of Web Matrix to work with files, you can use the Data Explorer to work with data. This provides ways of creating databases, connecting to existing ones, and working with tables and queries. Let's give this a go.

Try It Out Connecting to a Database

1. Select the Data Explorer tab, and click the Add Database Connection button - the one that's second in from the right, and will be the only one highlighted, as shown in Figure 8-2, if you haven't already got a database connection open:

2. Select Access Database from the window that appears and press OK.

3. Enter the following into the Data File text area (use a central location for the database, so that we can reuse it later in the book):

C:\BegASPNET11\data\Northwind.mdb

4. Press OK to connect to the database. This is the Northwind database, one of the sample databases that ships with Microsoft Access.

5. Figure 8-3 shows the tables contained in this database:

You can double-click on these to open the table, and see and change the data. One thing you might notice is that you don't see any queries - that's because Web Matrix doesn't support queries in Access. When connecting to SQL Server, you'll see the stored procedures - you can even create and edit them - but for Access, you are limited to tables only.

How It Works

There's nothing really to explain about how it works. What we are doing is simply creating a connection to a database that Web Matrix can use. This isn't required for ASP.NET to fetch data from databases, but Web Matrix has some great ways to generate code for you, so you don't have to do as much coding.

Creating Data Pages

Pages that display data can be created in a number of ways, and let's first look at the three ways that Web Matrix uses to save you coding. This is the quickest way to get data into your pages and saves a great deal of time. However, what it might not do is give you the knowledge to access databases without using Web Matrix. After we've seen the easy ways, we'll look at the .NET classes that deal with data. This way you'll have techniques to work with and without Web Matrix.

Displaying Data Using the Data Explorer

You've already seen how easy connecting to a database is using the Data Explorer. Creating pages directly from this explorer is even easier - all you have to do is drag the table name and drop it onto a page. This will automatically create a connection on the page and a fully functional data grid. Let's give this a go.

Try It Out Creating a Grid

1. Create a new ASP.NET page called Grid1.aspx.

2. From the Data Explorer, drag the Suppliers table onto your empty page as shown in Figure 8-4:

3. Save the page and run it as shown in Figure 8-5:

Amazing! A sortable grid full of data and you didn't have to write even a single line of code!

How It Works

The workings rely on two controls - the AccessDataSourceControl that provides the connection to the database, and an MxDataGrid, which is a Web Matrix control (also covered in Chapter 10) that displays the data. Looking at the HTML view for these controls gives you a good idea of what they do.

Let's start with the AccessDataSourceControl:

The first thing to notice is the way the control is declared. You're used to seeing asp: at the beginning of controls, but not wmx:. This prefix is the namespace - remember the previous chapter where we said that namespaces provide a separation between classes. In this case, these controls are part of Web Matrix, and have thus been given a namespace that is different from the standard server controls.

Apart from the id and runat, two other attributes provide the details regarding which database to connect to and what data to fetch:

The SelectCommand: Defines the SQL that will return the required data - in this case, it's all rows and columns from the Suppliers table. This is the default since we dragged this table, but we can customize the SelectCommand to return only selected rows or columns.

The ConnectionString: Defines the OLEDB connection string. You only need to worry about the bit with the path of the database file - the Data Source bit (if you move the file, you'll need to change this). The other parts of the ConnectionString just define the type of database and some database specific features. You don't need to know about these specifically (they are fully documented in the .NET help files); just copy them if you ever need to use them again.

At this stage, you have enough details to connect to a database and fetch data, but don't have any way to display it.

Continues...


Excerpted from Beginning ASP.NET 1.1 with Visual C# .NET 2003 by Chris Ullman John Kauffman Chris Hart Dave Sussman Daniel Maharry Excerpted by permission.
All rights reserved. No part of this excerpt may be reproduced or reprinted without permission in writing from the publisher.
Excerpts are provided by Dial-A-Book Inc. solely for the personal use of visitors to this web site.

Read More Show Less

Customer Reviews

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

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com 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 & Noble.com 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 & Noble.com 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 BN.com 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

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com 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 BN.com. 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 2 Customer Reviews
  • Anonymous

    Posted November 15, 2005

    Good Book, bad editor

    I found numerous erros in the code when trying to follow along with the asignments. The errors in the example code only added to time going through each chapter, because I had to debug my code before moving on with the next asignment. I find that a real problem when trying to move through it. If I was not an intermediate programer already, I would have been so frustrated that returning it would have been the only solution.

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

    Posted August 27, 2005

    Good introduction!

    This book talks about ASP .NET with C#. But don't expect too much on detailed elaboration on syntax. The ADO.NET chapter gives a succinct explanation and I want more on DataList and Repeater. Besides, the book expects you to use Web Matrix. I personally prefer the other one by Apress. More elaboration on ADO.Net is given for that one.

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

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