ASRNET is a totally new way of creating dynamic web applications, giving developers more flexibility and functionality than ever before. Its fresh approach of placing commonly-used code into controls, and separating presentation from business logic, makes developing and maintaining applications far easier. It is part of the Microsoft .NET Framework, and as such allows code to be created in any language that the Framework supports (currently C#, VB.NET, and JScript. NET out of the box).
This reference is divided into four sections. The first covers all the important ASP. NET namespaces for User Interface design, while the second looks at 'behind the scenes' topics like caching and configuration. The third section looks at the important new arena of Web Services, and finally, the fourth deals with the remaining hot topics, such as data access and XML, as well as containing a chapter of short, fully-working examples relating to all sections of the book, to help you understand the concepts being presented.
Who is this book for?
This book is for developers working with ASP. NET. It is designed to complement any of the books in Wrox's ASRNET series, and to present information to you in a compact, illustrative, and easily browsed form.
What does this book cover?
All major ASRNET specific namespaces
Caching
Configuration
Security
Useful .NET Framework namespaces
Web Services
Data in ASP. NET
When Microsoft announced its .NET revolution at PDC 2000, it sent waves through the Microsoft programming community. At its core was this mythical beast called the .NET Framework, which contained many namespaces, each containing classes that could be used to provide a great deal of functionality quite simply. With the introduction of this structured hierarchy came the need to establish the fact that any language that was to be used to create any kind of .NET application, from a Web Form to a Windows Form, would need to follow some strict rules.
VB developers heard that their beloved language was getting a much-needed face-lift with the introduction of proper Object-oriented programming. However, they soon realized that this massive update would require them to effectively re-learn the language from scratch. C++ developers were faced with an interesting path into .NET with the arrival of the new C# language, which looks and feels a lot like Java in its style and structure, but which is designed and built to integrate with the .NET
Framework to provide a clean and powerful alternative to the verbosity of VB.NET. In fact, with the leap to VB.NET being so large, many VB developers are considering learning C# instead. However, in among this crowd was a vital part of the community who had been closely involved with the evolution of the Web towards server-side programming - the ASP community.
ASP developers were faced with a difficult upgrade path - VBScript can't be used in ASP.NET applications, and it's been replaced by VB.NET as the default language, although any .NET language can be used to create ASP.NET applications. From the world of interpreted scripting to the world of compiled control-based development is a big change, but it's one that ASP.NET is designed to make as simple as possible.
What is ASP. NET?
ASP.NET is a totally new way of creating web applications. Instead of in-line script in a page, ASP.NET is designed to encapsulate commonly-used code into controls of various kinds, from simple HTML buttons running on the server, through data-bound listboxes and grids, to more complex controls like a calendar that magically appears after placing one single line of code on a page. To have produced something like that with ASP would have taken hours. You have the ability to write your own controls, whether they're simple user controls that just contain a little functionality for one of your site's pages, or pre-compiled controls that you can reuse time and time again, or even sell to other developers.
ASP.NET also embraces the world of Web Services, making it simple to create services that can be accessed using standards like SOAP, WSDL, and UDDI.
ADO.NET is Microsoft's latest data-access technology. It is a central part of the .NET Framework and far~more than an update to recent versions of ADO. Many of the concepts and components found in ADO.NET are completely new. It cleanly separates accessing data from manipulating data and is designed for disconnected usage. Accessing various data sources using OLE DB and ODBC is now separated from accessing SQL Server data, which is handled using a managed provider that talks to SQL Server on a lower level. This greatly improves the speed of data access to SQL Server-specific data, and allows developers to make use of SQL Server-specific tools. It is likely that many database vendors will soon release high performance .NET providers for their databases. Support for XML is an important aspect of the .NET Framework. ADO.NET can persist entire data structures to standard XML for transmission over the Internet and communicate with any XML-supporting application.
What Does This Book Cover?
This book is designed as a desktop companion for anyone developing ASP.NET applications. Contained in this book is a reference to all the ASP.NET-specific namespaces, plus some useful namespaces that are needed from time to time while developing with ASP.NET, as well as plenty of example code, and overviews of the technologies that you're likely to encounter as you develop ASP.NET applications.
This book is divided into four sections:
The first section is a straight reference of the main ASP.NET namespaces and the controls that are used in ASP.NET development.
The second section is an overview of some of the other aspects of ASP.NET including configuration, caching, and security. It finishes with an overview of some of the other .NET namespaces that are used regularly in ASP.NET development.
The third section covers Web Services, and includes a discussion of the key concepts, as well as referencing the namespaces.
Finally, there are overviews of both ADO.NET and XML usage within .NET to give you enough information to understand how they fit into the puzzle, along with plenty of sample code to see them in action. The last chapter shows how we can use the concepts leamed throughout the book by illustrating them with some broad examples.
Who Is This Book For?
This book is aimed at experienced developers, who have some knowledge of ASP or general development with Microsoft technologies, or experience of programming within the .NET Framework.
It is not aimed at beginners and does not cover general programming techniques or the basics of programming languages.
Primarily, it is intended as a reference for .NET developers who are looking to develop ASP.NET applications. For those developers who don't have much programming experience, but who are looking to get started with ASP.NET, we recommend reading Beginning ASP. NET, ISBN: 1-861005-04-0 first. For those developers wishing to learn about ASP.NET in detail, who've got more programming experience, possibly of VB application development, or more complex ASP application development, we recommend reading Professional ASP.NET, ISBN: 1-861004-88-5. This book is designed to sit alongside either of these titles.
What You Need To Use This Book
To run the samples in this book you need to have the following:
Windows 2000 or Windows XP.
The .NET Framework SDK. The code in this book will not work with .NET Beta 1.
The complete source code for the samples is available for download from our web site at http://www.wrox.com/Books/Book_Details.asp?isbn=186100530X.
Conventions
We've used a number of different styles of text and layout in this book to help differentiate between the different kinds of information. Here are examples of the styles we used and an explanation of what they mean.
Code has several fonts. If it's a code word that we're talking about in the text - for example, when discussing a For...Next loop, it's in this font. If it's a block of code that can be typed as a program and run, then it's also in a gray box:
Sometimes we'll see code in a mixture of styles, like this:
Widget < / name>
S10. O0
In cases like this, the code with a white background is code we are already familiar with; the line highlighted in gray is a new addition to the code since we last looked at it.
Advice, hints, and background information comes in this type of font.
Imnnrtant pieces oI: l:nrorma[ton CUlll~ 111 vu/t~ 1!1~i: tlll
Bullets appear indented, with each new bullet marked as follows:
Important Words are in a bold type font
Words that appear on the screen, or in menus like File or Window, are in a similar font to the one you would see on a Windows desktop Keys that you press on the keyboard like Ctrl and Enter, are in italics
Customer Support
We always value hearing from our readers, and we want to know what you think about this book: what you liked, what you didn't like, andwhat you think we can do better next time. You can send us your comments, either by returning the reply card in the back of the book, or by e-mail to feedback@wrox.com. Please be sure to mention the book title in your message.
How to Download the Sample Code for the Book
When you visit the Wrox site, http://www.wrox.com/, simply locate the title through our Search facility or by using one of the title lists. Click on Download in the Code column, or on Download Code on the book's detail page.
The files that are available for download from our site have been archived using WinZip. When you have saved the attachments to a folder on your hard-drive, you need to extract the files using a decompression program such as WinZip or PKUnzip. When you extract the files, the code is usually extracted into chapter folders. When you start the extraction process, ensure your software (WinZip, PKUnzip, etc.) is set to use folder names.
Errata
We've made every effort to make sure that there are no errors in the text or in the code. However, no one is perfect and mistakes do occur. If you find an error in one of our books, like a spelling mistake or a faulty piece of code, we would be very grateful for feedback. By sending in errata you may save another reader hours of frustration, and of course, you will be helping us provide even higher quality information. Simply e-mail the information to support@wrox.com, your information will be checked and, if correct, posted to the errata page for that title, or used in subsequent editions of the book. To find errata on the web site, go to http://www.wrox.com/, and simply locate the title through our Advanced Search or title list. Click on the Book Errata link, which is below the cover graphic on the book's detail page.
E-mail Support
If you wish to directly query a problem in the book with an expert who knows the book in detail then e-mail support @wrox.com, with the title of the book and the last four numbers of the ISBN in the subject field of the e-mail. A typical e-mail should include the following things:
The title of the book, last four digits of the ISBN, and page number of the problem in the Subject field. Your name, contact information, and the problem in the body of the message.
We won't send you junk marl. We need the details to save your time and ours. When you send an e-mail message, it will go through the following chain of support:
Customer Support - Your message is delivered to our customer support staff, who are the first people to read it. They have files on most frequently asked questions and will answer anything general about the book or the web site immediately.
Editorial - Deeper queries are forwarded to the technical editor responsible for that book. They have experience with the programming language or particular product, and are able to answer detailed technical questions on the subject.
The Authors - Finally, in the unlikely event that the editor cannot answer~our problem, he or she will forward the request to the author. We do try to protect the author from any distractions to their writing; however, we are quite happy to forward specific requests to them. All Wrox authors help with the support on their books. They will e-mail the customer and the editor with their response, and again all readers should benefit.
The Wrox Support process can only offer support to issues that are directly pertinent to the content of our published title. Support for questions that fall outside the scope of normal book support, is provided via the community lists of our http://p2p.wrox.com/forum.
p2p.wrox.com
For author and peer discussion join the P2P mailing lists. Our unique system provides programmer to programmerTM contact on mailing lists, forums, and newsgroups, all in addition to our one-to-one e- mail support system. If you post a query to P2P, you can be confident that it is being examined by the many Wrox authors and other industry experts who are present on our mailing lists. At p2p.wrox.com you will find a number of different lists that will help you, not only while you read this book, but also as you develop your own applications. Particularly appropriate to this book are the aspx and aspx_professional lists in the .NET category of the web site.
To subscribe to a mailing list just follow these steps:
l.Go to http://p2p.wrox.com/
2. Choose the appropriate category from the left menu bar
3. Click on the mailing list you wish to join
4, Follow the instructions to subscribe and fill in your e-mail address and password
5. Reply to the confirmation e-mail you receive
6. Use the subscription manager to join more lists and set your e-mail preferences
Why This System Offers the Best Support
You can choose to join the mailing lists or you can receixYe them as a weekly digest. If you don't have the time, or facilities, to receive the mailing list, then you can search our online archives. Junk and spam mails are deleted, and your own e-mail address is protected by the unique Lyris system. Queries about joining or leaving lists, and any other general queries about lists, should be sent to listsupport @ p2p.wrox.com.