Beginning DotNetNuke 4.0 Website Creation in C# 2005 with Visual Web Developer 2005 Express phần 1 docx

40 224 0
Beginning DotNetNuke 4.0 Website Creation in C# 2005 with Visual Web Developer 2005 Express phần 1 docx

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Beginning DotNetNuke 4.0 Website Creation in C# 2005 with Visual Web Developer 2005 Express From Novice to Professional ■■■ Nick Symmonds Beginning DotNetNuke 4.0 Website Creation in C# 2005 with Visual Web Developer 2005 Express: From Novice to Professional Copyright © 2006 by Nick Symmonds All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. ISBN-13 (pbk): 978-1-59059-681-4 ISBN-10 (pbk): 1-59059-681-1 Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1 Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. Lead Editor: James Huddleston Technical Reviewer: Adriano Baglioni Editorial Board: Steve Anglin, Ewan Buckingham, Gary Cornell, Jason Gilmore, Jonathan Gennick, Jonathan Hassell, James Huddleston, Chris Mills, Matthew Moodie, Dominic Shakeshaft, Jim Sumser, Keir Thomas, Matt Wade Project Manager: Beth Christmas Copy Edit Manager: Nicole LeClerc Copy Editor: Damon Larson Assistant Production Director: Kari Brooks-Copony Production Editor: Kelly Winquist Compositor: Pat Christenson Proofreaders: Nancy Riddiough, Lori Bring Indexer: Valerie Haynes Perry Artist: Kinetic Publishing Services, LLC Cover Designer: Kurt Krames Manufacturing Director: Tom Debolski Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail orders-ny@springer-sbm.com, or visit http://www.springeronline.com. For information on translations, please contact Apress directly at 2560 Ninth Street, Suite 219, Berkeley, CA 94710. Phone 510-549-5930, fax 510-549-5939, e-mail info@apress.com, or visit http://www.apress.com. The information in this book is distributed on an “as is” basis, without warranty. Although every precaution has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this work. The source code for this book is available to readers at www.apress.com in the Source Code section. For my daughter, Kate. The world is open to you. v Contents at a Glance About the Author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xiii About the Technical Reviewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv Acknowledgments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix ■CHAPTER 1 The Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 ■CHAPTER 2 The Express and DotNetNuke Combination . . . . . . . . . . . . . . . . . . . . 23 ■CHAPTER 3 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 ■CHAPTER 4 Basic C# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 ■CHAPTER 5 Visual Web Developer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 ■CHAPTER 6 DotNetNuke Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 ■CHAPTER 7 Creating a DNN Module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 ■CHAPTER 8 Finishing the DotNetNuke Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 ■CHAPTER 9 DNN Permissions and Portals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251 ■CHAPTER 10 DNN Hosting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275 ■CHAPTER 11 Creating a DNN Skin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293 ■CHAPTER 12 JavaScript and Ajax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339 ■CHAPTER 13 Next Steps and Suggestions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363 ■INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371 vii Contents About the Author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii About the Technical Reviewer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xv Acknowledgments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix ■CHAPTER 1 The Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 What You Need to Know . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Programming Experience. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Web Experience. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 What You Need to Have . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Configuring the Browser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 ■CHAPTER 2 The Express and DotNetNuke Combination . . . . . . . . . . . . . . . 23 Microsoft .NET. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Before .NET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 What .NET Fixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Garbage Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Safe Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Versioned Assemblies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Complete Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Common Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 .NET Remoting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Reversion to Configuration Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Discontinued Use of Pointers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 The Evolution of DotNetNuke . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 DotNetNuke Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 viii ■CONTENTS ■CHAPTER 3 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Installing IIS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Steps for Installation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Installing Visual C# Express Edition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Installing Visual Web Developer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Installing DotNetNuke . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 A Better Install . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Using VWD to Complete the DNN Install . . . . . . . . . . . . . . . . . . . . . . . 46 Installing and Configuring SQL Server Express Edition . . . . . . . . . . . . . . . 57 Installing SQL Server Express . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 ■CHAPTER 4 Basic C# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 The C# Integrated Development Environment. . . . . . . . . . . . . . . . . . . . . . . 65 The Look and Feel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 Creating a New Project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 Starting the Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 Project Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 Designing the Form. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 Adding the Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 Trying the Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 ■CHAPTER 5 Visual Web Developer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 The VWD IDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 The Look and Feel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 The Code-Behind File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 Coding the Event Handler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 Adding More Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 The New Web Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 The HTML Code Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 Completing the Code-Behind . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 Changing State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 ■CONTENTS ix ■CHAPTER 6 DotNetNuke Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 A DotNetNuke Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 What Now?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 How DotNetNuke Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 A Look at Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 Editing a DNN Site. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 Settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 The Project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 Getting Started. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 Setting Up the Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 Creating Pages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 Adding Modules to the Home Page . . . . . . . . . . . . . . . . . . . . . . . . . . 165 Adding Modules to the Menu Page . . . . . . . . . . . . . . . . . . . . . . . . . . 171 Adding Modules to the Inventory Page . . . . . . . . . . . . . . . . . . . . . . . 174 Adding Modules to the Registration Page . . . . . . . . . . . . . . . . . . . . . 177 Adding Modules to the Contacts Page. . . . . . . . . . . . . . . . . . . . . . . . 179 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 ■CHAPTER 7 Creating a DNN Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 Creating the Module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 Creating Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 Viewing the SQL Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 Starting the Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 What Did You Do? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 Enhancing the Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 The Database Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 The Business Logic Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206 The Presentation Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227 ■CHAPTER 8 Finishing the DotNetNuke Module . . . . . . . . . . . . . . . . . . . . . . . . 229 Setting Up the Code Transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 The CalculateHours Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230 The WeekPunches Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230 The FillData Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 Initial State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241 x ■CONTENTS Editing the ViewTimePunch Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242 Member Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242 The DisplayWeek Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243 The Combo Box Event Handler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244 The Punch Button Event Handler . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244 The Page _Load Event Handler. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246 Last Edit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248 Testing It All Out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248 Looking at the Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250 ■CHAPTER 9 DNN Permissions and Portals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251 Permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251 The Host Role. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251 The Registered User . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256 The Subscriber. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256 All Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257 Unauthenticated Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257 The Administrator Role. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258 Managing the Website . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258 A New Role. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258 Adjusting Page Permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260 Testing the Permissions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 Managing Portals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264 What Is a DNN Portal? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264 Creating the Portal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266 Editing the Portal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268 The Look and Feel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272 ■CHAPTER 10 DNN Hosting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275 Hosting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275 What You Get from a Host . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277 Downloading Your Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277 Finding a Host . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278 Installing a Skin. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279 Uploading a New Skin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279 Installing the Container . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284 ■CONTENTS xi DNN Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286 Unauthorized Break-Ins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287 Secure Sockets Layer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291 ■CHAPTER 11 Creating a DNN Skin. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293 What Is a Skin? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293 How DNN Does Skins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293 DNN Tokens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295 CSS Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296 Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298 Using a Template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299 Editing the Skin. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307 Rearranging the Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310 Adjusting the .css File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312 Testing the Skin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316 Packaging the Skin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316 Creating the Test Harness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317 Uploading the Skin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 Skin Edit Cycle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320 The Last Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324 Other Skinning Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325 What Else Can Be Skinned? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326 Creating a Container . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 Copying a Template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 Editing the Template. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330 Packaging the Container . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337 ■CHAPTER 12 JavaScript and Ajax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339 JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339 What Can JavaScript Do? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339 JavaScript Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340 When to Use JavaScript in ASP.NET . . . . . . . . . . . . . . . . . . . . . . . . . 341 A Small Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341 Debugging JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351 xii ■CONTENTS Ajax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353 Ajax and JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354 Ajax Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354 ASP.NET and Ajax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356 A Small Ajax Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362 ■CHAPTER 13 Next Steps and Suggestions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363 ASP.NET Development. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363 Investigating ASP.NET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365 Other .NET Stuff. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367 More Fun with DotNetNuke. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367 Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367 Other DNN Tricks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369 ■INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357 [...]... editions: • Visual C# 2005 Express • Visual Basic 2005 Express • Visual C++ 2005 Expresss • Visual J# 2005 Express • Visual Web Developer 2005 Express • SQL Server 2005 Express xix xx ■I N T R O D U C T I O N They are separated out as different products to make for a smaller install For this book, you will be using Visual C# 2005 Express and Visual Web Developer (VWD) 2005 Express DotNetNuke (DNN) is... that you have avoided something from Microsoft that has plagued us developers since the beginning of time (at least since the 80s, anyway) Programming Environments You will be loading two programming environments on your machine: Visual C# 2005 Express and Visual Web Developer 2005 Express The reason I’m having you load C# is to help with Chapter 4 C# is the language of choice in this book, and Chapter... I’ll get into the development environments themselves Yes, that was plural In this book, you’ll start with the Visual C# 2005 Express (C#) IDE as a way of getting familiar with C#, the programming language used in this book Later on, you’ll graduate to the Visual Web Developer (VWD) 2005 Express IDE and combine it with DotNetNuke ■Note IDE is short for integrated development environment The integrated... subdirectories containing images (images are not contained in the web page but are referenced by it), other web pages, and server code This server code manages the business logic and database access for your website You will also find a directory for the database if you have one Figure 1- 1 shows you a typical website directory structure for a basic website This was created using VWD Figure 1- 1 .NET web directory... you While this is a book about beginning web page design, it’s not a book about beginning programming for the totally uninitiated You will be expected to know certain things, and I will 1 2 CHAPTER 1 ■ THE BASICS take you through mini-lessons on the things I think you may not know Here is a list of the things you need to know about programming: • What the different kinds of loops are • How to create... into a smaller pant size? Does it come with a free steak knife? Well no This book is all about efficiency, not hype • It’s about programming C#, the powerful mainstream language of NET • It’s about getting your business working more efficiently • It’s about getting a web presence for internal and external use • It’s about making web portals that you can plug into your web pages • It’s about making... book resides Figure 1- 2 shows a small web page The HTML code behind this page is shown following Figure 1- 2 Example of simple HTML code output 5 6 CHAPTER 1 ■ THE BASICS Listing 1- 1 shows the HTML code for this simple page Listing 1- 1 HTML code for two buttons in a table   . Beginning DotNetNuke 4. 0 Website Creation in C# 200 5 with Visual Web Developer 200 5 Express From Novice to Professional ■■■ Nick Symmonds Beginning DotNetNuke 4. 0 Website Creation in C# 200 5. editions: • Visual C# 200 5 Express • Visual Basic 200 5 Express • Visual C++ 200 5 Expresss • Visual J# 200 5 Express • Visual Web Developer 200 5 Express • SQL Server 200 5 Express xx ■INTRODUCTION. with the Visual C# 200 5 Express (C#) IDE as a way of getting familiar with C#, the programming language used in this book. Later on, you’ll graduate to the Visual Web Developer (VWD) 200 5 Express

Ngày đăng: 14/08/2014, 10:22

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan