HAPPY BOOKSGIVING
Use code BOOKSGIVING during checkout to save 40%-55% on books and eBooks. Shop now.
Register your product to gain access to bonus material or receive a coupon.
This eBook includes the following formats, accessible from your Account page after purchase:
EPUB The open industry format known for its reflowable content and usability on supported mobile devices.
PDF The popular standard, used most often with the free Acrobat® Reader® software.
This eBook requires no passwords or activation to read. We customize your eBook by discreetly watermarking it with your name, making it uniquely yours.
Do more with Microsoft Expression Web 4 SP2—in less time!
This is the world’s most expert, complete, and practical guide to succeeding with Expression Web 4 SP2! Microsoft insider Jim Cheshire presents today’s best solutions for everything you need to do with Expression Web 4 SP2 and its brand-new HTML5, CSS3, and jQuery tools!. Create, edit, and manage content… implement leading-edge designs… integrate dynamic content… add powerful features with no custom coding… leverage SP2’s latest time-saving features…do the job right, and do it fast!
Register your book at www.quepublishing.com/title/9780789749192 to get the entire book in searchable PDF format, including all examples and sample files, plus a bonus four-chapter mini book on creating add-ins with JavaScript and HTML!
Download free code listings and samples here
Download the online only bonus chapters here
A searchable PDF of Microsoft Expression Web 4 In Depth can be downloaded here
Exploring jQuery Selectors, Part 3
Working with Code Snippets in Microsoft Expression Web 4 Service Pack 2 (SP2)
Creating Pages and Basic Page Editing in Expression Web 4
Download the sample pages (includes Chapter 3 and Index)
Introduction
Who Should Use This Book? 1
Why Use Expression Web? 1
How This Book Is Organized 2
Special Elements 3
I An Overview
1 An Overview of Expression Web 4 5
The Expression Web Interface 5
Panels 5
The Folder List 7
The Design Surface 8
The Status Bar 9
Working with Sites 9
Creating Sites 9
Site Reports 10
Publishing Sites 10
Tools for Creating Pages 11
Dynamic Web Templates 11
Find and Replace 11
Editing Tag Properties 12
Quick Tag Tools 13
Powerful CSS Tools 13
Style Builder 13
Manage Styles Panel 14
Apply Styles Panel 14
Site Optimization 16
Accessibility Checker 16
Compatibility Checker 16
SEO Checker 17
SuperPreview 17
CSS Reports 17
Scripting and Dynamic Content 18
Interactive Buttons 19
Behaviors 19
Layers 19
Photoshop Content 21
Deep Zoom Images 21
Video 21
ASP.NET Controls 22
PHP Support 22
Data Access Features 23
Creating Add-Ins 23
II Creating Content in Expression Web 4
2 Creating, Opening, and Importing Sites 25
What Is a Site? 25
How Expression Web Maintains a Site 25
Sites and Subsites 27
Site Templates 27
Types of Sites 29
Disk-Based Sites 29
FTP Sites 32
HTTP Sites 35
Importing Sites with the Import Site Wizard 38
Choosing an Import Method 38
Specifying a Destination Web Location 44
Finishing the Site Import Process 44
Deciding on a Site Type 45
3 Creating Pages and Basic Page Editing 47
Creating Pages 47
General Page 47
ASP.NET Pages 49
CSS Layouts 50
Style Sheets 50
Frames Pages 51
Importing Files 51
Formatting Text 52
How Expression Web Formats Text 52
Font Families 54
Font Sizes 55
Creating Hyperlinks 55
Targeting Hyperlinks 56
Hyperlink Parameters 56
HTML Bookmarks 57
Hyperlink Screentips 58
Spell-Checking 59
Configuring Page Properties 60
General Tab 60
Formatting Tab 61
Advanced Tab 61
Custom Tab 62
Language Tab 63
Using Code Snippets 63
Configuring File Editors 65
Making the Most of Code Snippets 68
4 Using Page Views 69
Introduction to Page Views 69
Working in Design View 70
Visual Aids 70
Ruler and Grid 74
Tracing Images 76
Adjusting Page Size 78
Working in Code View 79
Customizing Code Formatting 81
Quick Tag Tools 83
IntelliSense 83
Context Menu 84
Bookmarks 84
Working in Split View 85
Taking Advantage of Page Views 86
5 Using Tables 87
The Origin of Tables 87
The Makeup of an HTML Table Tag 88
The align Attribute 88
Table Borders 90
The cellpadding Attribute 91
The cellspacing Attribute 92
The frame Attribute 93
Rows, Columns, and Cells 93
The colspan and rowspan Attributes 94
Aligning Content in Cells 95
middle 95
Tables in Expression Web 96
Inserting Tables 97
Customizing Tables 97
Designing for Multiple Resolutions Using Tables 106
6 Using Frames 109
Using Frames in Sites 109
When to Use Frames 109
When Not to Use Frames 110
Creating Frames Pages 110
Configuring Frames 112
Splitting Frames 113
Deleting Frames 114
Creating Alternative Content 114
Targeting Frames 115
Adding and Configuring Inline Frames 117
Tips for Frames 119
Frame Borders 119
Resizable Frames 120
Breaking Out of a Frameset 121
7 Editing Tag Properties 123
An Introduction to Tag Properties 123
Understanding the Tag Properties Panel 123
Viewing Tag Properties with the Tag Properties Panel 126
Setting Tag Attributes with the Tag Properties Panel 128
Creating a Page 128
Setting Tag Properties 128
Using Events with the Tag Properties Panel 130
Tag Properties and Web Standards 131
8 Using the Quick Tag Tools 133
Introduction to the Quick Tag Tools 133
Locating and Selecting Elements Using the Quick Tag Selector 134
Editing Page Content Using the Quick Tag Editor 136
Editing a Tag 137
Removing a Tag 138
Inserting HTML 140
Wrapping a Tag 141
Controlling Positioning 142
Editing Tag Properties 142
When to Use the Quick Tag Editor 142
9 Using Graphics and Multimedia 145
Web Image Formats 145
The GIF Format 145
The JPEG Format 146
The PNG Format 146
Inserting Images 146
Formatting Images 148
Resizing Images 148
Changing Picture Properties 149
Converting Images 151
Creating Image Thumbnails 153
Configuring Auto Thumbnails 155
Creating Image Maps 156
Inserting Multimedia 157
Inserting Flash Movies 157
Inserting Silverlight Applications 159
Inserting Silverlight Video 160
Inserting Deep Zoom Images 161
Inserting Windows Media 163
Importing Adobe Photoshop Files 167
Page Transitions 168
Serving Video 169
10 Using Find and Replace 171
An Introduction to Find and Replace 171
Finding and Replacing Text 172
Using Regular Expressions 172
Finding Text 173
Replacing Text 176
Using HTML Rules in Find and Replace 179
Finding and Replacing HTML Tags 181
Saving Queries 182
Editing and Removing Recent Searches 183
11 Configuring Page Editor Options 187
Accessing Page Editor Options 187
Exploring Page Editor Options 187
The General Tab 187
AutoThumbnail Tab 191
Default Fonts Tab 191
Code Formatting Tab 191
CSS Tab 191
Color Coding Tab 193
Authoring Tab 193
Picture Tab 195
Code Snippets Tab 195
Ruler and Grid Tab 195
IntelliSense Tab 197
Font Families Tab 197
Experiment to Learn More 199
12 Maintaining Compatibility and Accessibility 201
An Introduction to Accessibility 201
Designing for Accessibility 202
Accessible Hyperlinks 202
Accessible Tables 203
Accessible Frames 204
Other Accessibility Considerations 204
Using the Accessibility Checker 205
Checking Accessibility 205
Working with the Accessibility Panel 206
Generating Accessibility Reports 208
Designing for Compatibility 209
What Is Browser Compatibility? 209
Compatibility Features in Expression Web 210
Identifying Code Problems 210
Marking Invalid Code 213
Using Reports to Find Problems 214
Seeing Color 216
13 Using SuperPreview 217
An Overview of SuperPreview 217
SuperPreview 217
How SuperPreview Generates a Preview 218
The SuperPreview Interface 220
Pointer Modes 220
DOM Highlighting 220
UI Helpers 220
Layout Modes 221
Preview URL 221
Baseline and Comparison Browser Selectors 222
DOM Tab 222
Browser Size Drop-Down 224
Using SuperPreview to Preview Layout 224
Setting Up the Previews 224
Generating Previews 225
Fixing Rendering Problems 225
Using the Snapshot Panel 229
Using Remote Browsers 230
Building Layouts with SuperPreview 232
III Publishing and Managing Websites
14 Publishing a Site 235
What Is Publishing? 235
Server Options for Publishing 236
FTP 236
FrontPage Server Extensions 237
WebDAV 239
File System 240
Publishing Content 241
Configuring a Publishing Destination and Publishing a Site 241
Publishing Selected Files and Synchronizing Files 244
Optimizing HTML During Publishing 244
Troubleshooting HTTP Publishing 246
Hosting Your Site 253
15 Site Management and Reporting 255
Site Settings 255
General Tab 255
Preview Tab 256
Advanced Tab 257
Publishing Tab 258
Site Reports 259
Configuring Reports 261
Saving Reports 263
Using SEO Reports to Increase Traffic 263
16 Using Personal Web Packages 267
What Are Web Packages? 267
Creating a Web Package 267
Importing a Web Package 270
Capitalizing on Web Packages 272
IV Using CSS in Expression Web 4
17 Creating Style Sheets 273
An Introduction to CSS 273
The Purpose of CSS 274
How CSS Is Applied to Pages 277
External Style Sheets 277
Embedded Style Sheets 277
Inline Styles 278
Formatting Content with CSS 278
Positioning Content with CSS 284
CSS Classes 287
Basic Application of a CSS Class 287
Applying Multiple CSS Classes 289
Pseudo-Classes 290
Pseudo-Elements 291
Centering a DIV with CSS 292
18 Managing CSS Styles 293
Expression Web’s CSS Tools 293
Apply Styles Panel 293
Manage Styles Panel 293
Link Style Sheet Dialog 295
CSS Properties Panel 295
CSS Reports 296
Style Builder 297
Working with Styles 298
Using the Manage Styles Panel 299
Using the Apply Styles Panel 304
Using the CSS Properties Panel 307
Using the Style Builder 310
Using the Attach Style Sheet and Link Style Sheet Dialogs 312
CSS Reports 313
Checking for CSS Errors 313
Checking CSS Usage 315
Arranging CSS Styles 315
V Scripting, DHTML, and Other Dynamic Content
19 Using Dynamic Web Templates 317
An Introduction to Dynamic Web Templates 317
Creating a Dynamic Web Template 318
Creating a Page Layout 319
Adding Editable Regions 319
Attaching a Dynamic Web Template 322
Attaching to an Existing Page 322
Attaching to a New Page 324
Updating a Site with Dynamic Web Templates 324
Modifying a Dynamic Web Template 324
Modifying an Attached Page in Code View 325
Managing Editable Regions 327
Adding a New Editable Region 327
Renaming an Existing Editable Region 328
Resolving Mismatched Editable Regions 329
Detaching a Dynamic Web Template 330
Under the Hood 331
20 Using Interactive Buttons 333
Overview of Interactive Buttons 333
Inserting and Configuring Interactive Buttons 334
The Button Tab 334
The Font Tab 335
The Image Tab 337
Saving an Interactive Button 339
Editing an Interactive Button 340
Practical Uses for Interactive Buttons 341
21 Using Behaviors 343
Understanding and Working with Behaviors 343
Using the Behaviors Panel 343
How Behaviors Work 344
Adding Behaviors Within a Paragraph 344
Expression Web Behaviors 345
The Call Script Behavior 345
The Change Property Behavior 346
The Change Property Restore Behavior 349
The Go To URL Behavior 349
The Jump Menu Behavior 350
The Jump Menu Go Behavior 350
The Open Browser Window Behavior 351
The Play Sound Behavior 352
The Popup Message Behavior 353
The Preload Images Behavior 353
The Set Text Behavior 354
The Swap Image Behavior 357
The Swap Image Restore Behavior 357
When to Use Behaviors 358
22 Client Scripting 359
A History of Browser Scripting 359
JavaScript Basics 361
Adding JavaScript to a Page 361
Linking to an External Script File 362
Adding Inline JavaScript 363
The Document Object Model 363
The window Object 364
The document Object 365
Writing Simple Scripts 366
Showing and Hiding Page Elements 366
Accessing and Changing Attributes 371
Form Field Validation 373
Debugging 377
23 Using Layers 379
Introduction to Layers 379
Inserting and Configuring Layers 380
Adding Content to a Layer 381
Resizing a Layer 382
Creating and Working with Child Layers 383
Positioning Layers 386
Setting Layer Properties with Behaviors 387
Setting the Visibility of Layers 387
Adding Layer Interactivity 388
Z-Order Anomalies 393
24 Using Form Controls 395
Understanding HTML Forms 395
Using Form Controls in Expression Web 396
Creating a Form 397
Saving Form Results to a File or Email 400
File Results Tab 401
Email Results Tab 402
Confirmation Page Tab 404
Saved Fields Tab 406
Saving Form Results to a Database 407
Updating a Database with New Fields 409
Hidden Form Fields 410
VI ASP.NET and PHP Development
25 Using Standard ASP.NET Controls 411
ASP.NET: A Brief Introduction 411
Creating ASP.NET Pages 412
The Basics of ASP.NET Controls 414
Understanding Control Properties 415
An Overview of the Standard ASP.NET Controls 419
The AdRotator Control 420
Creating a Simple AdRotator Page 422
Creating the Advertisement File 422
The Calendar Control 426
Formatting the Calendar Control 426
Calendar Control Properties 427
The Wizard Control 431
Wizard Steps 431
Creating a Simple Wizard 432
Making ASP.NET Work for You 439
Formatting with Styles 439
26 Using ASP.NET Navigation Controls 441
Overview of Navigation Systems 441
Creating a Sitemap File 443
Using the ASP.NET Menu Control 444
Creating a Test Site 445
Adding a Menu Control 446
Formatting the Menu Control 448
Using the ASP.NET TreeView Control 451
Formatting the TreeView Control 453
Using the ASP.NET SiteMapPath Control 457
Formatting the SiteMapPath Control 458
Improving Navigation with Master Pages 459
27 Using ASP.NET Master Pages and
User Controls 461
The Need for a Common Layout 461
The Master Page 461
The Content Page 464
Developing a Master Page Site 467
Creating the Master Page 467
Creating the Content Page 473
Extend Reusability with ASP.NET User Controls 475
28 Developing a Login System Using ASP.NET 477
Website Login Systems 477
Overview of ASP.NET Login Controls 478
The Login Control 478
LoginStatus Control 482
LoginName Control 482
ChangePassword Control 482
PasswordRecovery Control 487
CreateUserWizard Control 488
LoginView Control 489
Creating a Login Solution 491
Configuring the Website (IIS 5 or IIS 6) 492
Configuring the Website (IIS 7.x) 494
Configuring the Website (Microsoft Expression Development Server) 502
Creating the Web Pages 504
Using Web Deploy to Publish a Membership Database 507
29 Form Validation Using ASP.NET 511
The Need for Form Validation 511
The ASP.NET Validation Controls 511
Common Properties 513
Creating a Validated Form 515
Validation Groups 521
30 Using ASP.NET Web Parts 523
An Introduction to Web Parts 523
Creating ASP.NET User Controls 524
Web Parts Controls in the Toolbox 525
Creating a Web Parts Page 526
Web Parts Page Display Modes 529
Creating a User Control That Sets the Display Mode 530
Adding Code to Change the Display Mode 531
The Web Parts Catalog 534
Editing Web Parts Controls 537
31 Using ASP.NET Ajax 541
What Is Ajax? 541
Microsoft’s ASP.NET Ajax 541
Client-Side Ajax 542
Server-Side Ajax 542
Microsoft Ajax Control Toolkit 543
Adding Ajax Functionality to a Web Form 543
Creating a Site and Page 543
Adding Server-Side Code 545
Adding a ScriptManager Control 546
Adding an UpdatePanel Control 548
Using Client-Side Ajax 549
Adding a to the Web Form 549
Creating the Client Library 549
Adding the Client Script to the ScriptManager Control 550
32 Using PHP 553
An Introduction to PHP 553
PHP Syntax 553
Installing PHP 557
Installing IIS 7 and FastCGI 557
Installing PHP 559
Configuring the Microsoft Expression Development Server for PHP 560
Enabling PHP for IIS Using FastCGI 561
Creating PHP Pages 562
Previewing the Page 563
PHP in Design View 566
PHP in Code View 568
PHP Syntax Highlighting 568
Using IntelliSense with PHP 568
Setting PHP-Specific IntelliSense Options 570
PHP Script Options 572
Form Variable 572
URL Variable 573
Session Variable 573
Cookie Variable 574
Include Once 574
Code Block 575
Comment 576
Displaying PHP Information 577
33 Using the Microsoft Expression Development Server 579
Introduction to the Microsoft Expression Development Server 579
How to Use the Microsoft Expression Development Server 581
Limitations of the Microsoft Expression Development Server 583
Process Identity 583
No Remote Access 584
No Support for ASP Pages 584
Starting the Microsoft Expression Development Server from the Command Prompt 585
VII Managing Data with ASP.NET
34 Displaying and Editing Database Data with ASP.NET 587
A History of Data Access 587
Data Access Technologies in Expression Web 588
ASP.NET and Other Web Application Platforms 588
ASP.NET Data Source Controls 589
AccessDataSource Control 589
SqlDataSource Control 591
SiteMapDataSource Control 591
XmlDataSource Control 592
Displaying Data with ASP.NET 592
Displaying Data in Tabular Form 592
Sorting the GridView 595
Editing Data with ASP.NET 597
Configuring the Data Source 597
Configuring the GridView 598
Testing the Page 599
Creating a Master/Detail View 600
Creating the Master View 600
Creating the Detail View 601
35 Sending Email Using ASP.NET 605
A Typical Contact Form 605
Creating the Contact Form 606
Adding and Configuring ASP.NET Validation Controls 608
Adding the Validation Controls 608
Writing ASP.NET Code to Send Email 611
Displaying a Confirmation Page 613
VIII Creating Add-Ins Using JavaScript and HTML (Online Only)
36 Expression Web 4 Add-in Basics 615
Add-ins in Expression Web 615
Expression Web 4 JavaScript Add-ins 616
The Makeup of Expression Web Addins 616
XML Basics 617
General Manifest Elements and Attributes 618
src (optional) 618
legacy (optional) 619
developer (optional) 619
navigationallowed (optional) 619
Commands and Dialog Boxes 622
id (required) 622
filetype (optional) 622
onclick (optional) 623
Menus and Toolbars 624
(optional) 624
Panels 627
Menu and Command Bar Reference 630
Menus 631
Toolbars 650
37 Creating and Manipulating an Add-in User Interface 661
Planning an Add-in 661
Creating the Manifest with the Add-in Builder 662
Creating the Manifest 662
Editing the Manifest 667
Creating the User Interfaces 667
Creating a Custom Page Size for Panels 668
Creating the Panel’s Interface 669
Creating the Options Dialog Interface 672
Adding Functionality with JavaScript 673
JavaScript for panel.htm 673
JavaScript for options.htm 679
The Set Page Title Dialog 680
Accessing Managed Classes from JavaScript 682
Creating a Managed Class 683
Editing the Add-in Manifest to Load the Managed Class 686
Calling the Managed Class 687
Summary 687