1. Trang chủ
  2. » Công Nghệ Thông Tin

Beginning DotNetNuke 4.0 Website Creation in C# 2005 with Visual Web Developer 2005 Express potx

399 511 2

Đ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

Thông tin cơ bản

Định dạng
Số trang 399
Dung lượng 10,36 MB

Nội dung

Beginning DotNetNuke 4.0 Website Creation in C# 2005 with Visual Web Developer 2005 Express From Novice to Professional ■■■ Nick Symmonds Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com 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. Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com For my daughter, Kate. The world is open to you. Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com 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 Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com 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 Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com 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 Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com ■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 Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com 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 Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com ■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 Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com 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 Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com [...]... the fastest route to a web page Microsoft Express editions are new for 2005 They were released in early November of 2005 as part of the new Visual Studio 2005 and SQL Server 2005 releases There are six Express editions: • Visual C# 2005 ExpressVisual Basic 2005 ExpressVisual C++ 2005 Expresss • Visual J# 2005 Express • Visual Web Developer 2005 Express • SQL Server 2005 Express xix xx ■I N T R... book with respect to operating systems, memory, browsers, and so on Finally, 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. .. 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 4 goes over the basics of C# and how to create Windows programs This discussion has a twofold purpose: first, to get you familiar with C# and Windows programming; and second, to give you a reference when building web pages You will find... 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 a product written using ASP.NET It was recently revised to take advantage of ASP.NET 2.0, which is what VWD is based on DNN is a framework that sits on top of NET It allows you to rapidly develop professional-looking websites Developing websites rapidly is... eliminating DLL hell (explained in Chapter 2) Those of you who are programmers can rejoice Those who have never experienced DLL hell don’t need to worry Just know 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. .. 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 web portlets that you can plug into someone else’s portal • It’s about combining the best and easiest technology... a basic understanding of the Web, it might be worthwhile to touch on how a website works Whether you program in C# or Java or ColdFusion, all websites are essentially built the same First of all, the initial page of a website is in a directory on a server somewhere This directory could be several layers within the actual server’s directory structure If this were your website, the web server would consider... explain in a little more detail • C# is a language that is very close in syntax to quite a few others • C# allows you to move from C++ and Java easily • C# is a very efficient language • The C# language is defined by Ecma International and ISO standards Before discussing the points in the list, let me give you a bit of history The first high-level language was the C language In my beginning programming... security setting for this Figure 1-8 Enabling active scripting Debugging There is one last thing you need to do before starting out in web programming You’ve just enabled web scripting; now you need to be able to debug it VWD works just fine for debugging C# code and any other server-side code—however, it cannot debug code that runs in the browser IE can You can allow client-side JavaScript debugging with. .. run inside your browser These scripts control how the HTML controls act and react to user input They allow the dynamic interaction that you get with most websites Scripts are different from ActiveX controls or applets, as they are controlled by your browser and run in a “sandbox.” Now, you can certainly interact with the user on your website without using scripting, but it’s slower and harder For instance, . Express 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 Simpo PDF. Version - http://www.simpopdf.com Beginning DotNetNuke 4. 0 Website Creation in C# 200 5 with Visual Web Developer 200 5 Express: From Novice to Professional Copyright © 200 6 by Nick Symmonds All rights. Beginning DotNetNuke 4. 0 Website Creation in C# 200 5 with Visual Web Developer 200 5 Express From Novice to Professional ■■■ Nick Symmonds Simpo

Ngày đăng: 27/06/2014, 00:20

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN