Skip to main content

Professional ASP.NET 2.0 Design: CSS, Themes, and Master Pages

Professional ASP.NET 2.0 Design: CSS, Themes, and Master Pages

Jacob J. Sanford

ISBN: 978-0-470-22819-7

Aug 2007

474 pages

Select type: E-Book

Product not available for purchase

Description

This book is for anyone who wants to learn about using .NET for web interface design. Beginner or hobbyist .NET developers can certainly get a good foundation of .NET web interface design by going through this book from cover to cover. However, more seasoned .NET professionals, especially if they tend to steer away from the GUI of their projects, can also pick up a thing or two by focusing on certain chapters that appeal to them. This book is meant to take a reader from the beginning of a project to the completion of the interface design. Along the way, concepts are illustrated to show how the different pieces play together. So, anyone who really wants to understand the concepts presented in this book will be able to do so by reading the entire thing. However, this book should also serve as a good reference after you have read it or, in some cases, in place of reading it.

All of the early chapters provide useful information and examples for any web developer. Many of the concepts presented after Chapter 4 are more specifically targeted at .NET developers. In the later chapters, the target audience is .NET developers or, at least, people who want to become .NET developers. In those chapters, you should probably have at least a basic understanding of the .NET Framework and some experience with Visual Studio 2005 (or possibly Visual Studio 2003). If you are completely new to .NET, you may find it useful to pick up a beginning ASP.NET 2.0 book before delving too deeply into those chapters. If you want to learn about .NET 2.0 web interface design, you are the intended audience.

It should be noted that all of the .NET code samples in this book are in C#. However, this shouldn’t limit other developers, such as VB.NET developers, from understanding the concepts or being able to replicate the code in their own projects. The actual managed code examples are pretty limited and, when they are used, they should be fairly easy to port over to VB.NET.

This book covers the concepts serious developers need to begin designing cool and consistent web layouts. The early chapters focus on general web design standards that you need to grasp in order to move into the later chapters. Specifically, these concepts are:

  • Basic web design considerations (colors, fonts, images, accessibility, and so on) (Chapter 2)

  • Photoshop basics to get you started making your own graphics and color schemes (Chapter 3)

  • Cascading Style Sheets (CSS) and their use in web design layout (Chapter 4)

When you finish these chapters, you will have the basic shell for the project that you will continue to develop throughout the book. You will have the header graphic, color scheme, and CSS layout that you will begin to incorporate .NET-specific concepts to in the later chapters. This includes:

  • How to make .NET controls render accessible CSS code rather than their default: tables (Chapter 5)

  • Using the built-in controls of .NET to create easily maintainable and consistent site navigation (and how to make them render CSS divs instead of tables) (Chapter 6)

  • Creating your web site template with Master Pages (Chapter 7)

  • Creating themes and skins to style your .NET controls (Chapter 8)

  • Applying themes to your projects through various approaches, including base classing (Chapter 9)

The final “regular” chapter ends with you building an entirely new mobile device theme using all of the concepts learned in the previous chapters. In Chapter 10, you will start with modifying your graphic to better fit the resolution of your mobile devices. You will also learn how to modify your stylesheets and apply them programmatically to be used only for this theme. You will have a new Master Page and an entirely new theme. You will also see one way of switching themes based on your criteria (in this example, your criterion will be whether your client browser is a mobile device).

Beyond these chapters, you will get a “forward look” at some of the new technologies coming down the pipeline that affect these some of the material you learned in the preceding chapters. In Appendix A, you will get a glimpse at the upcoming release for Visual Studio, codenamed “Orcas.” This will almost exclusively focus on the new CSS features because they are the most relevant to the other chapters of the book, and there are so many new features regarding CSS management in this release that they warrant their own chapter (nested Master Pages are also included, but CSS takes up most of the appendix).

Finally, with Appendix B, the Visual Studio Codename “Orcas” discussion is extended to include Microsoft Silverlight. You will learn how to create drawing object, incorporate images, animate your objects, and affect the rendered output through your managed code.

If you read this book from cover to cover, you should end up with a really solid understanding of the current technologies for .NET developers to create consistent and accessible web interfaces, as well as a feeling of excitement for the new stuff that should be coming soon to a computer near you.

Introduction.

Chapter 1: aesthNETics.

Chapter 2: Web Design 101.

Chapter 3: Photoshop: Cool Tips and Tricks for Developers.

Chapter 4: Cascading Style Sheets (CSS).

Chapter 5: ASP.NET 2.0 CSS Friendly Control Adapters.

Chapter 6: Consistent Navigation.

Chapter 7: Master Pages.

Chapter 8: Themes.

Chapter 9: Applying Themes.

Chapter 10: Bringing It All Together — A New Theme.

Appendix A: Microsoft Visual Studio Codename "Orcas".

Appendix B: An Introduction to Microsoft Silverlight.

Index.

Code Downloads
Code downloads for this title are available here.
Download
Author's ReadMe File
Code downloads for this title are available here.
Download
Code Downloads
Code downloads for this title are available here.
Author's ReadMe File
Code downloads for this title are available here.
Chapter 3
Download
Chapter 4
Download
Chapter 5
Download
Chapter 6
Download
Chapter 7
Download
Chapter 8
Download
Chapter 9
Download
Chapter 10
Download
Code for Appendix A
Download
Code for Appendix B
Download
surfer5
Download
End-User License Agreement
Download
ChapterPageDetailsDatePrint Run
103Error in Text
the first bullet should read:

Font tab – Set Family to Arial in the Font name section. In Font attributes, set the Color to White. In the Size section, select Specific, and type in “.7 em.”
01/07/2008

188Error in Table
table, replace the description of "roles" with the following:
This allows you to open up your pages to various roles defined by the membership API. For example, maybe you have a page that you want to be accessible only to logged-on users but the link to that page visible to everyone. In this scenario, you simply set the roles attribute of your node to “*” (allows everyone) and then, even though the page is locked down through authentication (done in the web.config), all users can see the link. If an unauthenticated user clicks on the link, they will be asked to authenticate. Authenticated users, on the other hand, will be directed straight to the linked destination. This concept will be discussed in more detail later in this chapter.
09/27/07

193Error in Text
2nd paragraph of text (Begins with "You can see the use of the property...") replace the paragraph with:

The first thing you will need to do with this example is open up the pages in your menu. This is because the main node (the top-level node that everything falls under) has no URL associated with it. As such, the membership API cannot tell if the page is visible to users or not. Therefore, in order to open up that link (and all of its children), you have to open up the roles to everyone. You do this by setting the roles to “*”, as seen below.
09/27/07

193Error in Code
3rd grey shaded code block, 4th line from end: delete bold
roles="Admin":
<siteMapNode roles="Admin" url="Admin.aspx" title="Admin Link"

should be:
<siteMapNode url="Admin.aspx" title="Admin Link"
09/27/07

193Error in Text
last paragraph of text on the page (begins with "Finally, back in the...") replace the paragraph with:

Next, you need to lock down the page “Admin.aspx”, which you do in the web.config file. Essentially, you are telling the application to handle all of the other files one way but to handle this one file slightly differently. In this case, you are saying that all pages are open to all visitors with the exception of the rules you specifically set up for Admin.aspx. In making this change, the navigation controls will respect this security setting (unless opened up specifically through the roles attribute of the node in the sitemap file). In order to set this up, you need to insert code similar to the following in your web.config file:
09/27/07

311Error in Text
paragraph under Figure 8-30 says:

"The white border and font for the fist label is set..."

"fist"

should be:

"first"
10/17/2007