About Customizing HTML Styles for your Solution Site

The style mechanism in the Solution Sites provides most of the advantages of Cascading Style Sheets (CSS) without requiring a browser that supports CSS. The main advantage of this approach is that it provides central management of the appearance of the site. The Solution Sites will work with any browser that supports HTML 3.2. This provides compatibility with a number of older browsers, maximizing the number of potential customers. If this level of compatibility is not an issue for you, you can change these styles to specify client-side CSS styles.

All of the HTML styles used in the Solution Sites are stored in a Dictionary object that is created and initialized by two functions. These functions are GetSiteStyles and AddPartnerAndCustomerServiceStyles. During application initialization, the Main function in the global.asa file, which is contained in the file global_main_lib.asp, calls the GetSiteStyles function to create the MSCSSiteStyle dictionary. The GetSiteStyles function sets the basic styles, and then calls the AddPartnerAndCustomerServiceStyles function to add the styles used in the Partner and Customer services. As shipped, the service-related styles are only used in the Partner and Customer services; however, they are available throughout the application.

Since the MSCSSiteStyle dictionary is an application variable, using any of the styles is straightforward. The following example sets the Title font style on the text "Title".

   "<FONT" & MSCSSiteStyle.Title & ">" & "Title" & "</FONT>" 

Occasionally the Solution Sites use styles in just this way; however, in most cases the styles are inserted into HTML fragments in a wrapper function. These functions are contained in the include\html_lib.asp file. This makes it easier to use the styles and makes it possible to apply styles to an HTML fragment returned by another function. For example, the following code uses the RenderTextfunction to add a style to text returned by theMessageManager object:

htmTitle = RenderText( _
   mscsMessageManager.GetMessage("L_AdvancedSearch_HTMLTitle", sLanguage), _
   MSCSSiteStyle.Title) & CRLF

The MessageManager object is used throughout the Solution Sites to provide multiple language support. See Internationalization Features for more information about multiple language support.

You can customize the styles that are included with the Solution Sites.

This section contains:

Copyright © 2005 Microsoft Corporation.
All rights reserved.