A better model would be to maintain
a single StyleSheet control instance that is shared by all of the mobile web pages in a web
application.
The ASP.NET framework provides a method to store a StyleSheet instance in an external
file. We provide an example of this in the StyleSheetExternal mobile web page. Instead of embedding
a StyleSheet control hosting Style objects, the StyleSheet control references an external user
control file. This is what the StyleSheet control looks like in the StyleSheetExternal mobile
web page:
CHAPTER 10 ?– OTHER S ERVER C ONTROLS 491
ReferencePath="ExternalStyleSheetClass.ascx" />
The file named ExternalStyleSheetClass.ascx is a mobile user control file that is similar
to user controls in traditional ASP.NET development that is available for review in the Chapter 10
folder. The next section provides an overview of templates and device-specific choices.
Templates and Device-Specific Choices
As we discussed in Chapter 6, HTML or markup is a combination of content and appearance.
In the previous section, we discussed how to modify appearance using styles. In this section,
we discuss how to modify the document skeleton, or scaffold, on which control content hangs.
Pages:
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637