100% found this document useful (3 votes)
17 views

Build Your Own ASP NET 4 Web Site Using C VB 4th Edition Cristian Darie instant download

The document is a promotional overview for the book 'Build Your Own ASP.NET 4 Website Using C# & VB' by Cristian Darie, Wyatt Barnett, and Tim Posey, which is available for digital download. It includes a detailed table of contents covering various aspects of ASP.NET, programming basics, web applications, database design, and more. The book aims to serve as a comprehensive guide for beginners in ASP.NET development.

Uploaded by

rakidesosena
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (3 votes)
17 views

Build Your Own ASP NET 4 Web Site Using C VB 4th Edition Cristian Darie instant download

The document is a promotional overview for the book 'Build Your Own ASP.NET 4 Website Using C# & VB' by Cristian Darie, Wyatt Barnett, and Tim Posey, which is available for digital download. It includes a detailed table of contents covering various aspects of ASP.NET, programming basics, web applications, database design, and more. The book aims to serve as a comprehensive guide for beginners in ASP.NET development.

Uploaded by

rakidesosena
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 48

Build Your Own ASP NET 4 Web Site Using C VB 4th

Edition Cristian Darie pdf download

https://ebookfinal.com/download/build-your-own-asp-net-4-web-
site-using-c-vb-4th-edition-cristian-darie/

Explore and download more ebooks or textbooks


at ebookfinal.com
Here are some recommended products for you. Click the link to
download, or explore more at ebookfinal

Build Your Own ASP Net 3 5 Web site Using C VB 3rd Edition
Cristian Darie

https://ebookfinal.com/download/build-your-own-asp-net-3-5-web-site-
using-c-vb-3rd-edition-cristian-darie/

Build Your Own Database Driven Web Site Using PHP MySQL
4th Edition Kevin Yank

https://ebookfinal.com/download/build-your-own-database-driven-web-
site-using-php-mysql-4th-edition-kevin-yank/

Build Your Own Web Site 1st Edition David Karlins

https://ebookfinal.com/download/build-your-own-web-site-1st-edition-
david-karlins/

Professional ASP NET 4 in C and VB 1st Edition Bill Evjen

https://ebookfinal.com/download/professional-asp-net-4-in-c-and-
vb-1st-edition-bill-evjen/
Murach s ASP NET 4 Web programming with C 2010 4th ed
Edition Boehm

https://ebookfinal.com/download/murach-s-asp-net-4-web-programming-
with-c-2010-4th-ed-edition-boehm/

Beginning ASP NET 4 5 in C and VB 1st Edition Imar


Spaanjaars

https://ebookfinal.com/download/beginning-asp-net-4-5-in-c-and-vb-1st-
edition-imar-spaanjaars/

Pro ASP NET MVC 4 4th Edition Adam Freeman

https://ebookfinal.com/download/pro-asp-net-mvc-4-4th-edition-adam-
freeman/

Programming ASP NET MVC 4 Developing Real World Web


Applications with ASP NET MVC 1st Edition Jess Chadwick

https://ebookfinal.com/download/programming-asp-net-mvc-4-developing-
real-world-web-applications-with-asp-net-mvc-1st-edition-jess-
chadwick/

Beginning jQuery 2 for ASP NET Developers Using jQuery 2


with ASP NET Web Forms and ASP NET MVC 1st Edition Bipin
Joshi (Auth.)
https://ebookfinal.com/download/beginning-jquery-2-for-asp-net-
developers-using-jquery-2-with-asp-net-web-forms-and-asp-net-mvc-1st-
edition-bipin-joshi-auth/
Build Your Own ASP NET 4 Web Site Using C VB 4th
Edition Cristian Darie Digital Instant Download
Author(s): Cristian Darie, Wyatt Barnett, Tim Posey
ISBN(s): 9780987090867, 0987090860
Edition: 4
File Details: PDF, 32.11 MB
Year: 2011
Language: english
Pantone:

CMYK:

BUILD YOUR OWN

ASP.NET 4
Grey scale

WEBSITE
PANTONE Orange 021 C PANTONE 2955 C

CMYK O, 53, 100, 0 CMYK 100, 45, 0, 37

Black 50% Black 100%

USING C# & VB
BY CRISTIAN DARIE
WYATT BARNETT
& TIM POSEY
4TH EDITION

THE ULTIMATE ASP.NET BEGINNER’S GUIDE


Summary of Contents
Foreword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii
1. Introducing ASP.NET and the .NET Platform . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2. ASP.NET Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3. VB and C# Programming Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
4. Constructing ASP.NET Web Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
5. Building Web Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
6. Using the Validation Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
7. Database Design and Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
8. Speaking SQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
9. ADO.NET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363
10. Displaying Content Using Data Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
11. Managing Content Using GridView and DetailsView . . . . . . . . . . . . 463
12. Advanced Data Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507
13. Security and User Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569
14. Working with Files and Email . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 615
15. Introduction to LINQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655
16. Introduction to MVC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671
17. ASP.NET AJAX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 701
A. Web Control Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 723
B. Deploying ASP.NET Websites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 763
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 775
BUILD YOUR OWN
ASP.NET 4 WEBSITE
USING C# & VB
BY CRISTIAN DARIE
WYATT BARNETT
TIM POSEY
4TH EDITION
iv

Build Your Own ASP.NET 4 Website Using C# & VB


by Cristian Darie, Wyatt Barnett, and Tim Posey

Copyright © 2011 SitePoint Pty. Ltd.

Expert Reviewer: Pranav Rastogi Editor: Sarah Broomhall


Product Editor: Simon Mackie Index Editor: Michelle Combs
Technical Editor: Ricky Onsman Cover Design: Alex Walker
Printing History: Latest Update: Fourth Edition: September
First Edition: April 2004 2011
Second Edition: October 2006
Third Edition: September 2008

Notice of Rights
All rights reserved. No part of this book may be reproduced, stored in a retrieval system or transmitted
in any form or by any means, without the prior written permission of the publisher, except in the case
of brief quotations embodied in critical articles or reviews.

Notice of Liability
The author and publisher have made every effort to ensure the accuracy of the information herein.
However, the information contained in this book is sold without warranty, either express or implied.
Neither the authors and SitePoint Pty. Ltd., nor its dealers or distributors, will be held liable for any
damages to be caused either directly or indirectly by the instructions contained in this book, or by the
software or hardware products described herein.

Trademark Notice
Rather than indicating every occurrence of a trademarked name as such, this book uses the names only
in an editorial fashion and to the benefit of the trademark owner with no intention of infringement of
the trademark.

Published by SitePoint Pty. Ltd.

48 Cambridge Street Collingwood


VIC Australia 3066.
Web: www.sitepoint.com
Email: business@sitepoint.com

ISBN 978-0-9870908-6-7 (print)

ISBN 978-0-9871530-3-6 (ebook)


Printed and bound in the United States of America
v

About the Authors

Cristian Darie is a software engineer with experience in a wide range of modern technologies,
and the author of numerous technical books, including the popular Beginning E-Commerce
series. He initially tasted programming success with a prize in his first programming contest
at the age of 12. From there, Cristian moved on to many other similar achievements, and is
now studying distributed application architectures for his PhD.

Wyatt Barnett leads the in-house development team for a major industry trade association
in Washington DC. When not slinging obscene amounts of C# and SQL at a few exceedingly
large monitors, he is most often spotted staring at HDTV and other forms of entertainment
in local watering holes.

Tim Posey is a long-time developer and a passionate educator. Armed with a B.S. in Computer
Science and an M.B.A. in Finance, he has traversed many industries, consulting for multiple
corporations in banking, insurance, energy, and various e-commerce industries. As a serial
entrepreneur, he mentors local startups and non-profit organizations. He serves as a senior
software engineer at a Fortune 1000 company and an Adjunct Professor of Finance for the
American Public University System. His favorite pastime is watching Alabama football. He
may be contacted at tim@timposey.net.

About the Technical Editor

Ricky Onsman is an Australian freelance web designer and jack of all trades. With a back-
ground in information and content services, he built his first website in 1994 for a disability
information service and has been messing about on the web ever since. He is the president
of the Web Industry Professionals Association.

About SitePoint

SitePoint specializes in publishing fun, practical, and easy-to-understand content for web
professionals. Visit http://www.sitepoint.com/ to access our books, newsletters, articles, and
community forums.
To my family and friends.

—Cristian Darie

To my Father, whose guidance got


me this far.

—Wyatt Barnett

For LJ and Erin.

—Tim Posey
Table of Contents

Foreword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi

Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii
Who Should Read This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii
What’s in This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiv
Where to Find Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxviii
The SitePoint Forums . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxviii
The Book’s Website . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxviii
The SitePoint Newsletters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxix
The SitePoint Podcast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxix
Your Feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxix
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxx
Conventions Used in This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxx
Code Samples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxx
Tips, Notes, and Warnings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxi

Chapter 1 Introducing ASP.NET and the .NET


Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
What is ASP.NET? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Installing the Required Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Installing Visual Web Developer 2010 Express Edition . . . . . . . . . . . . 6
Installing SQL Server Management Studio Express . . . . . . . . . . . . . . 8
Writing Your First ASP.NET Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Getting Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
x

Chapter 2 ASP.NET Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . 27


ASP.NET Page Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Code Declaration Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Code Render Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
ASP.NET Server Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Server-side Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Literal Text and HTML Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
View State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Working with Directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
ASP.NET Languages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Visual Basic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
C# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

Chapter 3 VB and C# Programming Basics . . . . 47


Programming Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Control Events and Subroutines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Page Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Variables and Variable Declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Conditional Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Object Oriented Programming Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Objects and Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
xi

Constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Understanding Inheritance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Objects in .NET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Namespaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Using Code-behind Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94

Chapter 4 Constructing ASP.NET Web


Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Web Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
HTML Server Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Using the HTML Server Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Web Server Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Standard Web Server Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
List Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Advanced Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Web User Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Creating a Web User Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Master Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
Using Cascading Style Sheets (CSS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
Types of Styles and Style Sheets . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

Chapter 5 Building Web Applications . . . . . . . . . . 159


Introducing the Dorknozzle Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Using Visual Web Developer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Meeting the Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
xii

Executing Your Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172


Core Web Application Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
Web.config . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
Global.asax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Using Application State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
Working with User Sessions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
Using the Cache Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
Using Cookies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
Starting the Dorknozzle Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Preparing the Sitemap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
Using Themes, Skins, and Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Building the Master Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
Using the Master Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
Extending Dorknozzle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
Debugging and Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
Debugging with Visual Web Developer . . . . . . . . . . . . . . . . . . . . . . 218
Other Kinds of Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
Custom Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
Handling Exceptions Locally . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232

Chapter 6 Using the Validation Controls . . . . . . 235


Client-side Validation and Server-side Validation . . . . . . . . . . . . . . . . . 236
Introducing the ASP.NET Validation Controls . . . . . . . . . . . . . . . . . . . . . 236
Enforcing Validation on the Server . . . . . . . . . . . . . . . . . . . . . . . . . 240
Using Validation Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
RequiredFieldValidator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
CompareValidator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
RangeValidator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
ValidationSummary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
xiii

RegularExpressionValidator . . . . . . . . . . . . . . . . . . . . . . . . 254
CustomValidator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
Validation Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
Updating Dorknozzle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270

Chapter 7 Database Design and


Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
What Is a Database? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
Creating Your First Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
Creating a New Database Using Visual Web Developer . . . . . . . . . 277
Creating a New Database Using SQL Server Management
Studio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
Creating Database Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
Column Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
Primary Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
Creating the Employees Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
Creating the Remaining Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
Populating the Data Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
Relational Database Design Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
Foreign Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
Using Database Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
Implementing Relationships in the Dorknozzle Database . . . . . . . 308
Diagrams and Table Relationships . . . . . . . . . . . . . . . . . . . . . . . . . . 312
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316

Chapter 8 Speaking SQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317


Reading Data from a Single Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
xiv

Using the SELECT Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321


Selecting Certain Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
Selecting Unique Data with DISTINCT . . . . . . . . . . . . . . . . . . . . . 326
Row Filtering with WHERE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
Selecting Ranges of Values with BETWEEN . . . . . . . . . . . . . . . . . . . 330
Matching Patterns with LIKE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
Using the IN Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332
Sorting Results Using ORDER BY . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
Limiting the Number of Results with TOP . . . . . . . . . . . . . . . . . . . 334
Reading Data from Multiple Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
Subqueries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
Table Joins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
Expressions and Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
Transact-SQL (T-SQL) Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
Arithmetic Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
String Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
Date and Time Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
Working with Groups of Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347
The COUNT Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
Grouping Records Using GROUP BY . . . . . . . . . . . . . . . . . . . . . . . . 349
Filtering Groups Using HAVING . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
The SUM, AVG, MIN, and MAX Functions . . . . . . . . . . . . . . . . . . . . . . 351
Updating Existing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
The INSERT Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
The UPDATE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
The DELETE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
Stored Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360
xv

Chapter 9 ADO.NET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363


Introducing ADO.NET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364
Importing the SqlClient Namespace . . . . . . . . . . . . . . . . . . . . . 366
Defining the Database Connection . . . . . . . . . . . . . . . . . . . . . . . . . 367
Preparing the Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368
Executing the Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369
Setting Up Database Authentication . . . . . . . . . . . . . . . . . . . . . . . . 371
Reading the Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
Using Parameters with Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
Bulletproofing Data Access Code . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
Using the Repeater Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
Creating the Dorknozzle Employee Directory . . . . . . . . . . . . . . . . . . . . . 393
More Data Binding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398
Inserting Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405
Updating Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411
Deleting Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428
Using Stored Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433

Chapter 10 Displaying Content Using Data


Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
DataList Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436
Handling DataList Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440
Editing DataList Items and Using Templates . . . . . . . . . . . . . . . . . . . . 448
DataList and Visual Web Developer . . . . . . . . . . . . . . . . . . . . . . . . . . . 457
Styling the DataList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461
xvi

Chapter 11 Managing Content Using GridView


and DetailsView . . . . . . . . . . . . . . . . . . . . . . . . 463
Using the GridView Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464
Customizing the GridView Columns . . . . . . . . . . . . . . . . . . . . . . . 471
Styling the GridView with Templates, Skins, and CSS . . . . . . . . . 472
Selecting Grid Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477
Using the DetailsView Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 482
Styling the DetailsView . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486
GridView and DetailsView Events . . . . . . . . . . . . . . . . . . . . . . . . . . 488
Entering Edit Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492
Using Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496
Updating DetailsView Records . . . . . . . . . . . . . . . . . . . . . . . . . . 500
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505

Chapter 12 Advanced Data Access . . . . . . . . . . . . . . . . 507


Using Data Source Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508
Binding the GridView to a SqlDataSource . . . . . . . . . . . . . . . 510
Binding the DetailsView to a SqlDataSource . . . . . . . . . . . . 519
Displaying Lists in DetailsView . . . . . . . . . . . . . . . . . . . . . . . . . . 531
More on SqlDataSource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 534
Working with Data Sets and Data Tables . . . . . . . . . . . . . . . . . . . . . . . . . 535
What Is a Data Set Made From? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 538
Binding DataSets to Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540
Implementing Paging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 546
Storing Data Sets in View State . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548
Implementing Sorting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 551
Filtering Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 562
Updating a Database from a Modified DataSet . . . . . . . . . . . . . . . . . . 563
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567
xvii

Chapter 13 Security and User


Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . 569
Basic Security Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 570
Securing ASP.NET Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 572
Working with Forms Authentication . . . . . . . . . . . . . . . . . . . . . . . . 574
ASP.NET Memberships and Roles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 588
Creating the Membership Data Structures . . . . . . . . . . . . . . . . . . . 588
Using Your Database to Store Membership Data . . . . . . . . . . . . . . 590
Using the ASP.NET Web Site Configuration Tool . . . . . . . . . . . . . . 596
Creating Users and Roles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599
Changing Password Strength Requirements . . . . . . . . . . . . . . . . . . 600
Securing Your Web Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . 603
Using the ASP.NET Login Controls . . . . . . . . . . . . . . . . . . . . . . . . . . 605
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613

Chapter 14 Working with Files and Email . . . . . 615


Writing and Reading Text Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616
Setting Up Permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 617
Writing Content to a Text File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 620
Reading Content from a Text File . . . . . . . . . . . . . . . . . . . . . . . . . . 624
Accessing Directories and Directory Information . . . . . . . . . . . . . . . . . . 628
Working with Directory and File Paths . . . . . . . . . . . . . . . . . . . . . . 632
Uploading Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 635
Sending Email with ASP.NET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 639
Sending a Test Email . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 641
Creating the Company Newsletters Page . . . . . . . . . . . . . . . . . . . . 643
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 653
xviii

Chapter 15 Introduction to LINQ . . . . . . . . . . . . . . . . . . 655


Extension Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 657
LINQ to SQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 657
Updating Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661
Relationships . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 662
Directly Executing Queries from the DataContext . . . . . . . . . . . 663
Stored Procedures with LINQ-to-SQL . . . . . . . . . . . . . . . . . . . . . . . 664
Using ASP.NET and LINQ-to-SQL . . . . . . . . . . . . . . . . . . . . . . . . . . . 667

Chapter 16 Introduction to MVC . . . . . . . . . . . . . . . . . . . 671


Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 698

Chapter 17 ASP.NET AJAX . . . . . . . . . . . . . . . . . . . . . . . . . . 701


What is Ajax? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 702
ASP.NET AJAX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703
Using the UpdatePanel Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 704
Managing the ScriptManager Control . . . . . . . . . . . . . . . . . . . . 708
Using Triggers to Update an UpdatePanel . . . . . . . . . . . . . . . . . . . . . . 709
The ASP.NET AJAX Control Toolkit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 713
The ValidatorCalloutExtender Control Extender . . . . . . . . 715
Getting Started with Animation . . . . . . . . . . . . . . . . . . . . . . . . . . . 718
jQuery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 720
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 721

Appendix A Web Control Reference . . . . . . . . . . . . . . . 723


The WebControl Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 723
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 723
Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 724
Standard Web Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725
xix

AdRotator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725
BulletedList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725
Button . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 726
Calendar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 727
CheckBox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 729
CheckBoxList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 729
DropDownList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 730
FileUpload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 731
HiddenField . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 732
HyperLink . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 732
Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 732
ImageButton . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 733
ImageMap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 733
Label . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 734
LinkButton . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 734
ListBox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 735
Literal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 736
MultiView . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 736
Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 736
PlaceHolder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 737
RadioButton . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 737
RadioButtonList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 738
TextBox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 739
Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 740
Xml . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 744
Validation Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 744
CompareValidator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 745
CustomValidator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 746
RangeValidator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 747
RegularExpressionValidator . . . . . . . . . . . . . . . . . . . . . . . . 748
Discovering Diverse Content Through
Random Scribd Documents
[Inhoud]
153. Ajam besengèk ternaté.
Een kip, 1 à 2 fijngesneden lomboks, 1 theelepel trassie, 1 theelepel
zout, 4 sioongs bawang-poetih, 2 lepels boter, ½ kopje azijn, 2
lepels ketjap, 1 theelepel peper.

Bereiding:

De kip wordt met peper en zout ingewreven en daarna geroosterd.


De kruiden worden bij elkander fijngestampt, [59]lichtbruin gebraden,
daarna de ketjap en azijn er bij gevoegd.

Nu snijdt men de geroosterde kip in twee helften, doet deze stukken


bij de saus en laat alles samen verder gaar braden.

[Inhoud]
154. Ajam besengèk tertanie.
Een jonge kip, peper en zout, 3 eetlepels uien, 3 sioongs
fijngesneden bawang-poetih, 1 eetlepel ketoembar, ½ lepel djienten,
2 schijfjes laos, 1 theelepel rauwe trassie, 6 lomboks, 1 theelepel
goela djawa, de santen van ½ klapper, het sap van 3 djeroeks-nipis.
Boter of klapperolie.

Bereiding:

De kip wordt met zout en peper ingewreven en gaar geroosterd.

Men kan de kip, nadat zij geroosterd is, in haar geheel laten of in
stukken snijden. De kruiden worden bij elkander fijngestampt en in
boter of olie opgebraden; daarna voegt men er de santen bij en doet
er, al roerende het sap van de drie djeroeks in. De kip wordt er nu,
met zout naar smaak, bij gedaan en verder alles bij elkaar gekookt,
tot de saus dik is.

[Inhoud]
155. Ajam boemboe-roedjak I.
Een kip, 3 lepels fijngesneden uien, 3 sioongs bawang-poetih, 1 à 2
lomboks, 4 kemiries, 1 theelepel trassie, ½ lepel asem zonder pitten,
een goede theelepel suiker, zout naar smaak, een groote kop santen.
Boter of klapperolie, 2 djeroek-poeroet-bladeren.

Bereiding:

De kip wordt heel geroosterd of aan stukken gesneden en bruin


gebraden. De opgegeven kruiden worden bij elkander fijngestampt,
daarna de santen met de djeroek-poeroet-bladeren er bij gedaan. Is
de kip in haar geheel gebleven, dan wordt zij met deze saus aldoor,
aan beide kanten, besprenkeld, tot de saus op en de kip gaar is. Is
de kip aan stukken gesneden en gebraden, dan kookt men de
stukken in deze saus op, tot ze gaar zijn en de saus gebonden is.

[Inhoud]
156. Ajam boemboe-roedjak II.
Een jonge kip, 2 lomboks fijngesneden, 2 sioongs bawang-poetih,
[60]¾ lepel geweekte asem, 1 theelepel trassie, zout en suiker naar
smaak, 1 theelepel gesneden laos, 1 à 2 lepels ketjap, 2 djeroek-
poeroet-blaadjes, een kopje bouillon, boter of klapperolie.

Bereiding:

De kip wordt opengespouwen, met zout en peper ingewreven en


gepoft. De kruiden worden bij elkander fijngestampt en met den
bouillon, de ketjap en de djeroek-poeroet-blaadjes vermengd; laat
dit even doorkoken; daarna roostert men de kip weer en besprenkelt
haar aldoor, aan weêrskanten, tot ze goed bruin ziet.

[Inhoud]
157. Ajam doefi haché.
Een jong haantje, 2 sioongs bawang-poetih, 2 lepels fijngesneden
uien, 5 schijfjes laos, ½ lepel djienten, 1 lepel ketoembar, 5 heele
kruidnagels, ½ notemuskaat, 1 theelepel zout, 1 of meer lomboks, 1
à 2 lepels ketjap, 1 eetlepel asem- of djeroek-water, boter of
klapperolie.

Bereiding:

De kip wordt half gaar gekookt; de kruiden bij elkander fijngestampt


en in boter of olie opgebraden. Vervolgens wordt de kip aan stukken
gesneden en met de kruiden gebraden, daarna wat bouillon van de
kip er bij gedaan, met de ketjap en het asem- of djeroek-water. Men
laat dit verder bij elkander doorstoven, tot de kip gaar en het
gerecht bijna droog is.

[Inhoud]
158. Ajam gorèng asem garem I.
Een jonge kip, 2 eetlepels asem, zout, water, boter of klapperolie.

Bereiding:

De kip wordt in water half gaar gekookt, daarna aan stukken


gesneden. Van de asem maakt men, met zout en water, een papje
en zeeft het daarna. Vervolgens worden de stukken kip er mede
ingewreven en verder in boter of olie bruin gebraden.

[Inhoud]
159. Ajam gorèng asem garem II
Een jonge kip, zout en water, 2 sioongs bawang-poetih, [61]1 lepel
seréh, 5 schijfjes langkwas, 1 theelepel trassie, 2 theelepels
ketoembar, 1 theelepel djienten, een kwart vingerlengte
fijngesneden koenjit, een stuk djeroek-poeroet-schil, 2 daon salam,
bouillon. Boter of klapperolie.

Bereiding:

De kip wordt aan stukken gesneden en even opgekookt. De kruiden


worden bij elkander fijngestampt en in boter opgebraden. Daarna
doet men de kip er bij en braadt dit nog eens samen op. Voeg er
lepelsgewijze den bouillon bij, tot de kip gaar is Men dient de kip
droog gebraden op.

[Inhoud]
160. Ajam kerrie.
Een kip, 1 lepel ketoembar, ½ lepel djienten, 5 schijfjes laos, 1 lepel
fijngesneden seréh, een halve vingerlengte fijngesneden koenjit, 2
lepels fijngesneden uien. 4 sioongs bawang-poetih, 1 à 2 lomboks, 1
of meer theelepels zout, santen van een klapper, boter of
klapperolie.

Bereiding:

Men kookt de kip even op en snijdt ze aan stukken. Daarna stampt


men de kruiden bij elkander fijn, kookt ze met de kip en de santen
op; laat dit ongedekt koken en roer er af en toe in, opdat de santen
niet gaat schiften. Als de jus te dik wordt, kan men er wat bouillon
van de kip bijvoegen.

[Inhoud]
161. Ajam ketjap.
Een jonge kip, 2 lepels fijngesneden uien, ½ theelepel fijne peper,
½ notemuskaat, 1 theelepel zout, 2 lepels ketjap, 1 lepel djeroek-
water, bouillon, gestampte beschuit.

Bereiding:

De kip wordt in een weinig water en zout opgekookt, daarna in


stukken gesneden.

De kruiden worden met elkander fijngestampt, bij de kip en den


bouillon gedaan, met de ketjap en het djeroek-water. Laat dit alles
koken tot het bijna droog wordt. Men bindt het met twee lepels
fijngestampte beschuit.

[Inhoud]
162. Ajam kiesmies.
Een jonge kip, 4 heele kruidnagels, ½ pijp kaneel, 1 bierglas
[62]wijn, 1 ons krenten, djeroek-sap, zout en suiker naar smaak, 1 à
2 lepels droog en bruin gebraden meel.

Bereiding:

De kip wordt in stukken gesneden en even in water en zout


opgekookt. Doe daarna bovengemelde kruiden met zout, suiker en
djeroek-water er bij, daarna, iets later, den wijn en de krenten. Kook
nu alles gaar, leng het gebraden meel eerst met water aan en doe
dit door de kip. Als de saus dik begint te worden, zet men den pot
van het vuur af.

Men denke er aan, dat de krenten te voren van de steeltjes worden


ontdaan.

[Inhoud]
163. Ajam koewah-djeroek.
Een kip, zout en water, een stuk foelie, 4 à 5 eierdooiers, 1 à 2 lepels
meel, djeroek-water en peper naar smaak.

Bereiding:

De kip wordt even in water, zout en foelie opgekookt. Het meel lengt
men aan met een paar lepels water; daarna klutst men de
eierdooiers en vermengt ze met een kopje van den kippenbouillon.
Roer hier door heen het aangelengde meel met ½ theelepeltje
peper en voeg dit bij de kip, die te voren in stukken is gesneden.

Kook alles samen op, tot het dik begint te worden en doe er, het
laatst, het djeroek-water bij, onder aanhoudend roeren.

[Inhoud]
164. Ajam kòdòk.
Een niet te jonge kip, 4 à 5 uitjes, een handvol fijngesneden
pieterselie, 3 eierdooiers, een dikke snede brood in melk geweekt, 1
à 2 lepels ketjap, 1 theelepel peper, zout naar smaak, bouillon, boter
of klapperolie.

Bereiding:

Als men de kip slacht, zorge men dat het vel ongeschonden blijft bij
het plukken der veeren. Nu snijdt men de kip voorzichtig op den rug
open en trekt het vel er, zachtjes aan, zóó af, dat dit in zijn geheel
blijft.

Vervolgens ontdoet men het vleesch van al de beenderen en maakt


er, met de bovengemelde kruiden, de eierdooiers en het brood,
gehakt van; vul hiermede het vel op, (niet al te [63]stijf opgevuld,
opdat het vel bij het braden niet barste) en naai de kip van boven
dicht.

Daarna braadt men de kip, met boter, aan beide kanten bruin en
voegt er de ketjap met eenige lepels bouillon bij.

Wanneer de kip begint te zwellen, prikt men er voorzichtig hier en


daar met een vork of breinaald in, opdat ze niet barst. Laat ze aan
beide kanten goed braden en giet er af en toe jus over.

Dit gerecht wordt bij compôte voorgediend.

[Inhoud]
165. Ajam laksa.
Een kip, 4 lepels fijngesneden uien, 1 ons laksa, 5 à 6 peperkorrels,
2 à 3 lepels azijn, 2 à 3 lepels madéra, 2 hard gekookte eieren, zout,
boter of klapperolie.

Bereiding:

Men snijdt de kip aan stukken en braadt ze bruin, in boter of olie. De


laksa weeke men te voren in water; de uien worden met de
peperkorrels bruin gebraden; daarna doet men er de kip bij, met den
azijn, de madéra en bouillon of water met zout naar smaak. Laat dit
samen opkoken, tot de kip gaar is. Vervolgens haalt men de stukken
kip er uit en rangeert die op een schaaltje. De geweekte laksa doet
men nu in de jus en kookt dit even samen door; giet dit vervolgens
over de kip en versiert verder dit gerecht met de in vierde parten
hard gekookte eieren.

[Inhoud]
166. Ajam lèlawar.
Een kip, 2 lepels fijngesneden uien, 2 sioongs bawang-poetih, 1 lepel
ketoembar, ½ lepel djienten, 1 lepel fijngesneden seréh, (of een
stuk seréh ineengedraaid), ½ lepel fijngesneden laos. Een
fijngesneden lombok, een lepel djeroek-water, zout naar smaak, 1 à
2 kopjes santen, boter of klapperolie.

Bereiding:

Men kookt de kip goed gaar en scheurt daarna het vleesch aan
reepjes er af. Al de kruiden worden bij elkander fijngestampt en in
boter of olie gebraden, vervolgens de reepjes kippenvleesch er bij
gevoegd. Men braadt dit nog eens samen op en voegt er het
djeroek-water en de santen bij. Nu [64]laat men dit alles zachtjes
doorstoven. Men zorgt dat het niet te droog worde.

[Inhoud]
167. Ajam lembaran.
Een kip, 3 lepels fijngesneden uien, 2 sioongs bawang-poetih, 1
lombok, een halve vingerlengte fijngesneden koenjit, 1 theelepel
zout, 1 theelepel trassie, 1 salam blad, 2 djeroek-poeroet-schillen, 1
kopje santen of bouillon, boter of klapperolie.

Bereiding:

De kip wordt aan stukken gesneden en even in water en zout


opgekookt. De kruiden, behalve de bladeren, worden met elkander
fijngestampt en in boter of olie opgebraden. Daarna doet men de
stukken kip bij de kruiden en braadt dit nog eens samen op.
Vervolgens doet men er de santen of bouillon, met de schillen en
bladeren, bij en laat dit verder gaar stoven, totdat de saus gebonden
wordt.

[Inhoud]
168. Ajam O.
Een kip, 8 sioongs bawang-poetih, 2 lepels taotjo, ½ theelepel
trassie, 5 fijngesneden schijfjes djahé, ½ theelepel fijne peper, 1
kopje vol fijngesneden prij, ¼ kopje ketjap, zout, boter of
klapperolie, water.

Bereiding:

De kip wordt in stukken gesneden; daarna snijdt men de bawang-


poetih fijn en braadt ze in boter op, voegt daar de taotjo bij, lengt
de trassie aan met water en doet dit bij de vorige gebraden
ingrediënten. Vervolgens worden de stukken kip er bij gedaan en
samen nog eens doorgebraden. Eindelijk voegt men de ketjap, de
gember en de prij aan dit gerecht toe en laat dit samen gaar
worden.

[Inhoud]
169. Ajam panggang.
Een jong haantje, 1 lepel fijngehakte pieterselie, 5 fijngehakte uitjes,
1 theelepel zout, ¾ theelepel peper, boter.

Bereiding:

Het haantje wordt op de borst opengesneden, daarna in tweeën


gespouwen; men wrijft het met de opgegeven kruiden [65]in en
roostert het, met veel boter, boven een zacht vuurtje, aan beide
kanten bruin. Men kan het ook in boter bruin braden en dan de
volgende saus er bij geven, als men deze ajam panggang met
gebakken aardappelen voordient.

De saus: drie à vier zéér fijn gehakte uitjes, een handvol fijngehakte
pieterselie, een lepel aangemaakte mosterd, een lepel slaolie, ½
kopje azijn.

De uien, pieterselie, mosterd en slaolie worden bij elkander


gevoegd, geroerd en aangelengd met de hoeveelheid azijn; dit
mengsel giet men vervolgens over de ajam panggang.

[Inhoud]
170. Ajam panggang met djeroek-water
en ketjap.
Een jonge kip, ½ kopje ketjap, 3 lepels djeroek-water, 2 lepels
gesmolten boter, ½ theelepel peper, een theelepel zout.

Bereiding:

De kip wordt door midden gesneden, opengespouwen en met peper


en zout goed ingewreven. Nu vermengt men de twee lepels
gesmolten boter met de ketjap en het djeroek-water.

De kip wordt op een zacht vuurtje geroosterd en altijd-door met


deze jus besprenkeld; dit gebeurt aan weêrskanten, door middel van
een lange kippenveer, die men in de jus heeft gedoopt; als de kip
bruin is, (aan beide kanten) is ze gaar.

Deze ajam panggang wordt, mits zonder peper, zeer veel gebruikt
voor zieken en herstellenden.

[Inhoud]
171. Ajam pedis.
Een kip, 3 lepels fijngesneden uien, 5 sioongs bawang-poetih, 8
lomboks, 1 theelepel trassie, 1 theelepel zout, 2 lepels asem- of
djeroek-water, boter of klapperolie.

Bereiding:

De kip wordt schoongemaakt, met zout ingewreven, daarna


geroosterd. De kruiden stampt men bij elkander fijn en lengt ze aan
met het asem- of djeroek-water. Hiermede wordt nu de kip,
gedurende het roosteren, aan beide kanten aanhoudend
besprenkeld, tot ze er mooi bruin uitziet en gaar is.

[Inhoud]
172. Ajam peniki. (Ternataansch).
Een kip, 2 lepels fijngesneden uien, 4 sioongs bawang-poetih, [66]4 à
5 lomboks, de pitten er uit gehaald, ½ lepel zeer fijn gesneden
djahé, 1 lepel fijngesneden seréh, 5 kemiries, 1 theelepel trassie, 2
lepels asem- of djeroek-water, 2 djeroek-poeroet-bladeren, 1
theelepel zout, 1 kopje warm water, 1 kopje dikke santen. Boter of
klapperolie.

Bereiding:

De kip wordt aan stukken gesneden; de kruiden worden, met


uitzondering van de trassie, fijngestampt, vermengd en in boter of
olie lichtbruin gebraden, daarna de stukken kip er bij gevoegd.

Nu lengt men de trassie met een lepel water aan, voegt dit water,
met het asem-water, de djeroek-poeroet-bladeren en het kopje
warm water, bij de kip. Laat dit samen koken, tot de kip bijna gaar
is, voeg daarna het kopje santen er bij en laat dit samen koken, tot
de olie er uitkomt.

[Inhoud]
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookfinal.com

You might also like