学习ASP.NET3.5

出版时间:2009-4  出版社:开明出版社  作者:(美)丽波蒂(Liberty,J.),(美)赫维茨(Hurwitz,D.),(美)麦克唐纳德(MacDonald,B.) 著  页数:588  

前言

ASP.NET 3.5 is arguably the fastest, most efficient, most reliable, and best-supported way to create interactive web applications available today. Combined with the development tools available from Microsoft (both free and commercial), it is incredibly easy to create web sites that look great and perform well. Best of all, most of the "plumbing" (security, data access, layout, and so on) is taken care of for you by the .NET Framework. .About This BookThis book will teach you how to build professional quality, interactive, robust datadriven web applications using Visual Basic 2008.ASP.NET is not difficult to learn. All of the concepts are straightforward, and the Visual Studio and Visual Web Developer environments simplify the process of building powerful web applications. The difficulty in ASP.NET is only that it is so complete and flexible that there are many pieces that must be woven together to build a robust, scalable, and efficient application. This book cuts to the heart of the matter,showing in clear, easy-to-follow steps how to understand and build a web site.ASP.NET makes it possible to create sophisticated and useful sites with minimal coding. You can enhance the functionality of your sites with Visual Basic or C#, if you choose, but the amount of code that you must write is surprisingly small. We've adopted that philosophy throughout this book, showing you how to take the most advantage of the tools Microsoft and ASP.NET provide while keeping the coding to a minimum. Whenever you need to write code, we walk you through each step and explain what it all does.About This SeriesO'Reilly Learning books are written and designed for anyone who wants to build new skills and who prefers a structured approach to studying. Each title in this series makes use of learning principles that we (with your help) have found to be best at equipping you with the knowledge you need for joining that new project, for coping with that unexpected assignment from your manager, or for learning a new language in a hurry.To get the most out of any book in the Learning series, we recommend you work your way through each chapter in sequence. You'll find that you can get a quick grasp of a chapter's content by reading the instructional captions we've written for its examples and figures. You can also use the chapter Summary to preview its key takeaways and to review what you have learned. Most chapters feature one or more sample applications, and, if you learn best by reading code, you can turn to the complete source listing that appears just before the Summary. To bridge any gaps in your knowledge, check out the Cheat Sheets. Finally, to help you test your mastery of the material in each chapter, we conclude with a Brain Builder section, which includes a short quiz to test your grasp of the theory, and some hands-on exercises to give you practice building real applications with your new skills.Learning books work with you as you learn——much as you would expect from a trusted colleague or instructor——and we strive to make your learning experience enjoyable. Tell us how we've done by sending us praise, brickbats, or suggestions for improvements to learning@oreilly.com.Learning or Programming?We have written two ASP.NET books: the one you are currently reading and another named Programming ASP. NET 3.5 (O'Reilly). This book, Learning ASP. NET 3.5, is intended for beginning ASP.NET developers, and answers the question, "What is the quickest way for me to build real web applications with the least amount of coding?" Our other book, Programming ASP. NET, is for developers who are saying: "Help me learn in depth——show me how everything works, and then help me put it to work in web applications." The key difference is this book is aimed to make you productive quickly, while the second book is designed to explore the technology in more depth. They complement each other, but if you are starting out and want to get to work fast, this is the one for you.Learning ASP. NET 3.5 assumes you know some HTML and have some familiarity with Visual Basic 2008 (VB) or C#, or can pick up what you need along the way (or you're willing to run right out and buy Programming Visual Basic 2008 by TimPatrick [O'Reilly], although for what you'll be doing here, you won't really need it).To help with this, we have included VB Cheat Sheets throughout the book to explain'and clarify some of the VB topics for newbies.VB Versus C#A quick note on Visual Basic versus C#: some people choose a .NET book based on what language the examples are given in. That's a natural reaction, but it's really not necessary, and here's why: there is very little actual VB or C# code in any given ASP. NET application, and what there is, you can easily translate from one to the other "on inspection." Besides, the two languages are strikingly similar, and both produce the same output. If you know one, it's quite simple to learn the other. In fact, there are software tools that can convert one language to the other with amazing accuracy. Finally, ASP.NET programmers benefit terrifically by being "bilingual"——that is, having the ability to read VB and write C# (or vice versa).In the end, we had to choose one language over the other, and we elected to do the examples and exercises for this book in Visual Basic. However, if you prefer C#, you'll find every single example and exercise solution reproduced in C# free for download from this book's web site at http://www.oreilly.com/catalog/ 9780596518455.How This Book Is OrganizedChapter 1, Getting Started, walks you through creating your first web site, HelloWorld.Chapter 2, Building Web Applications, goes over the fundamentals of web sites and covers the basic controls available to you in ASP.NET.Chapter 3, Snappier Web Sites with AJAX, shows you how to integrate this powerful client-side technology into your ASP.NET pages.Chapter 4, Saving and Retrieving Data, shows you how to make your site interact with data stored in a database. You'll see controls to retrieve data, allow your users to interact with that data, and then save it back to the database. We'll also discuss the Language Integrated Query (LINQ), new to the .NET Framework.Chapter 5 looks at Validation. ASP.NET provides extensive support for data validation, including ensuring that users provide required information, checking that values are within a range, and matching regular expressions.Chapter 6, Style Sheets, Master Pages, and Navigation, shows you how to make web sites that are professional quality, good looking, consistent, and easy to navigate.Chapter 7 examines State and Life Cycle in ASP.NET. Understanding how, and in what order, a page and its controls are created on the server and rendered to the browser is crucial for building successful interactive web sites. State is the current value of everything associated with the page. This is mostly handled automatically, but this chapter shows you how useful it can be to the developer.Chapter 8, Errors, Exceptions, and Bugs, Oh My/, shows you how to use Visual Studio's tools to debug your application, and also how to handle errors in your code before users see them.Chapter 9, Security, shows you how you can protect your web site from malicious users. You'll find out how to register your users and how to hide parts of your site from users who don't have the appropriate privileges.Chapter 10, Personalization, shows you how to allow your end users to customize the look and feel of the web site according to their personal preferences. You will see how to use themes and skins to accomplish this.Chapter 11, Putting It All Together, is a single, large example that integrates almost everything you have learned throughout the book.Appendix A, Installing the Stuff You'll Need, tells you what hardware and software is required to run the examples in this book and helps you set up your environment.Appendix B, Copying a Web Site, describes the process of copying a web site to a new web site. This is a technique used often throughout this book when building up examples.Appendix C, Publishing Your Web Site, covers the steps to take a web site from the development stage to being publicly available on the web. ..Appendix D, Answers to Quizzes and Exercises, presents 'detailed solutions to all of the quiz questions and practice exercises found at the end of each chapter.Conventions Used in This BookThe following font conventions are used in this book:ItalicUsed for pathnames, filenames, program names, Internet addresses, such as domain names and URLs, and new terms where they are defined.Constant widthUsed for command lines and options that should be typed verbatim, and names and keywords in program examples. Also used for parameters, attributes, properties, expressions, statements, and values.Constant width italicUsed for replaceable items, such as variables or optional elements, within syntaxlines or code.Constant width boldUsed for emphasis within program code examples.Pay special attention to notes set apart from the text with the following icons:This is a tip. It contains useful supplementary information about the topic at hand.This is a warning. It helps you solve and avoid annoying problems.Support: A Note from Jesse LibertyI provide ongoing support for my books through my web site. You can obtain the source code for all of the examples in Learning ASP. NET 3.5 at:http://www. LibertyAssociates.comThere, you'll also find access to a book support discussion group that has a section set aside for questions about Learning ASP. NET 3.5. Before you post a question, however, please check my web site to see if there is a Frequently Asked Questions (FAQ) list or an errata file. If you check these files and still have a question, then please go ahead and post it to the discussion center. The most effective way to get help is to ask a precise question or to create a small program that illustrates your area of concern or confusion, and be sure to mention which edition of the book you have (this is the second edition).Using Code ExamplesThis book is here to help you get your job done. In general, you may use the code in this book in your programs and documentation. You do not need to contact us for permission unless you're reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing a CD-ROM of examples from O'Reilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your product's documentation does require permission. We al3preciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: "Learning ASP. NET 3.5, by Jesse Liberty, Dan Hurwitz, and Brian MacDonald. Copyright 2008 Jesse Liberty, Dan Hurwitz, and Brian MacDonald, 978-0-596-51845-5."If you feel your use of code examples falls outside fair use or the permission given above, feel free to contact us at http://permissions@oreilly.com.We'd Like to Hear from YouPlease address comments and questions concerning this book to the publisher:O'Reilly Media, Inc.1005 Gravenstein Highway NorthSebastopol, CA 95472800-998-9938 (in the United States or Canada)707-829-0515 (international or local)707-829-0104 (fax)We have a web page for this book, where we list errata, examples, and any additional information. You can access this page at:http://www, oreilly, com/catalog/9 780596518455To comment or ask technical questions about this book, send email to:http://bookquestions@oreilly, comFor more information about our books, conferences, Resource Centers, and theO'Reilly Network, see our web site at:http://www, oreiUy, com/Visit the O'Reilly .NET DevCenter:http:l/www, oreiUynet, com/dotnetSafari Books OnlineWhen you see a Safari Books Online icon on the cover of your Safari; favorite technology book, that means the book is available onlineBooks Onlin  through the O'Reilly Network Safari Bookshelf.Safari offers a solution that's better than e-books. It's a virtual library that lets you easily search thousands of top tech books, cut and paste code samples, download chapters, and find quick answers when you need the most accurate, current information. Try it for free at http://safari, oreilly, com.AcknowledgmentsFrom Jesse LibertyI am particularly grateful to John Osborn, who has shepherded all of,my work through O'Reilly, as well as the editors' and production folks at O'Reilly who (as always) made this book so much more than what we originally Created.From Dan HurwitzIn addition to the people mentioned by Jesse, I also want to commend Brian for the great work he has done on this edition. It is a much better book because of his efforts. And, as always, I especially want to thank my wife for being so supportive of this project. It sounds trite and repetitious, but it would not be possible without her help.From Brian MacDonaldAs always, my deepest appreciation goes to Jesse and Dan for inviting me to be a part of this project, and for having me back for another edition. My thanks also to John Osborn for getting me involved with O'Reilly in the first place, many years ago now. My gratitude and appreciation to our technical reviewers, Jesudas Chinnathampi, Owen Davies, and especially to Mike Pope, who took no prisoners, but whose feedback improved the quality of this book tremendously. Sumita Mukerji, production editor extrao.rdinaire, went above and beyond the call of duty several times, and I thank her for that. Many thanks to my wife, Carole, who once again provided technical and moral support, and to my son, Alex, for his patience while Dad worked on yet another chapter. Finally, thanks to my parents, Reenie and Dave, for fostering my love of reading and writing, and also for the gift of the 'lap desk that I used while writing this book.

内容概要

《学习ASP.NET 3.5 第二版》教你如何使用具有AJAX功能的最新版ASP.NET和Visual Studio 2008开发效率的功能来创造引人入胜和互动的应用程序。你所需要准备好的只不过是HTML基础知识和构建具有专业水准网站的强烈愿望。  本书的每一章都相对独立,讲解了各种新技能——配合带有图解和大量详细注释的例子——这些例子可以马上就应用到实际当中。在每一章里,你还可以通过实践性很强的习题来练习所学到的东西,并通过要点复习测验来检验自己的理解,这些都是本书特有的知识构建方法。通过本书,你将学到:  •关于ASENET网站开发中不同方面的系列教程。  •整合AJAX的例子。  •用于演示新概念如何运作的例子——每章都包含一个处于不同开发阶段的完整例子,或者是一系列的小例子。  •关于Visual Basic、JavaScript和SQL的侧栏要点提示,用于帮助那些对这些领域缺乏甚至没有背景知识的读者。  •最后一章中的示例网络应用程序结合了所有你学到的知识或者技能。  如果想使用世界上最流行的网络开发技术来加快开发速度,《学习ASP.NET3.5》就是为这个任务所准备的最佳资源。  作者简介:  丽波蒂(Jesse Liberty),是O'Reilly的《Learning ASP.NET 2.0 with AJAX》《Programming C#》和《Programming.NET 3.5》等畅销书的作者。

作者简介

作者:(美国)Jesse Liberty (美国)Dan Hurwitz (美国)Brian MacDonald丽波蒂(Jesse Liberty),是O'Reilly的《Learning ASP.NET 2.0 with AJAX》《Programming C#》和《Programming.NET 3.5》等畅销书的作者。

书籍目录

Preface1. Getting Started Hello World Creating a New Web Site Creating HelloWorld Making the HelloWorld Web Site Interactive What You Just Did Summary Brain Builder  Quiz  Exercise2. Building Web Applications Mastering Web Site Fundamentals  The Page  Controls  Code-Behind Files  Events and Postbacks  Synchronous and Asynchronous Postbacks   The Page Load event and synchronous postback   Adding asynchronous postbacks Using Controls  Organizing the Properties Window   Finding properties with IntelliSense  Basic Controls  Creating Tables  Setting Properties  Selection Controls  Panels  List Selection Controls   Adding items with the Item editor   Adding items in Source view  More Selection Controls  Using Selections to Display Text  Images  Links  LinkButtons  Source Code  Summary  Brain Builder  Quiz  Exercises3. Snappier Web Sites with AJAX  Take a Walk on the Client Side  ScriptManager and UpdatePanel  Controlling Browser History  Extending Controls with the Control Toolkit  TextBoxWaterMarkExtender  PopupControlExtender  CollapsiblePanelExtender  Source Code Listing  Summary  Brain Builder  Quiz  Exercises4. Saving and Retrieving Data  Getting Data from a Database  Binding Data Controls  Create a Sample Web Page  ……5. Validation6. Style Sheets,Master Pages,and Navigation7. State and Life Cycle8. Errors,Exceptions,and Bugs,Oh My!9. Security

章节摘录

插图:Learning ASP.NET 3.5 will teach you everything you need to know m build professional quality web applications using Microsoft's latest technology, including ASP.NET 3.5 and AJAX. ASP.NET is Microsoft's tool for creating dynamic, interactive web pages and applications. Using plain vanilla HTML, you can make a web page that has some great content, but it's static——the content doesn't change, no matter what the user does. You can even use Cascading Style Sheets (CS8) to make it the most visually impressive thing on the Web, but if what you really need is for users to be able to leave comments, or browse your inventory, or buy things from you, then HTML alone won't get it done.That's where ASP.NET 3.5 comes in. Within these chapters, you'll find out how to do all the great tricks that you see on the most popular commercial web sites. Order forms? We've got that. Interact with a database? You'll do that, too. Dynamic navigation tools? It's in here. Personalized appearance that the user can customize? No problem.The best part is, you'll do it all with minimal coding. You can make ASP.NET pages in your favorite text editor if you want, but that's a bit like using a hammer and chisel to write the Great American Novel. If you use Visual Studio 2008, or its free counterpart, Visual Web Developer, adding many features to your page is as simple as dragging and dropping. The tools generate most of the code for you. If you're an old-school type who cringes at the idea of letting someone else write your code, it's all still there, and you can tweak it to your heart's content. Consider this, though: would you rather spend your time writing the code for another radio button list, or figuring out what to do with the data that you gather using it? In short, the tools do the tedious chores for you, so you can get to the good stuff.

媒体关注与评论

“我想推荐这本书,因为它对ASP.NET最常用的知识和技能进行了很棒的讲解。读者通读全书,将会碰到他们在创建小型动态网站时可能面临的所有任务。”    ——Mike Pope,微软用户教育

编辑推荐

《学习ASP.NET3.5(影印版)》是由开明出版社出版的。

图书封面

评论、评分、阅读与下载


    学习ASP.NET3.5 PDF格式下载


用户评论 (总计2条)

 
 

  •   现在读有些过时了...还是建议在网上查资料学习吧. 这本书确实没什么特别出众的地方, 不推荐买.
  •   好书,写得通俗易懂。
 

250万本中文图书简介、评论、评分,PDF格式免费下载。 第一图书网 手机版

京ICP备13047387号-7