Prev | Current Page 228 | Next

Rob Cameron and Dale Michalk

"Pro ASP.NET 3.5 Server Controls and AJAX Components"

NET 2.0 and later. Running the same
web form test with the Font-Name set to Monotype Corsiva, CssClass set to grayborder, and the
italic, bold, and underline options selected results in the screenshot shown in Figure 4-12.
148 CHAPTER 4 ?–  T HE WEBCONTROL BASE CLASS AND CONTROL S TYLES
Figure 4-12. Down-level browser rendering
Netscape 3.04 does not know how to interpret the
tag correctly, resulting in the jumbled
output. Changing the tag to
instead does render the line breaks correctly, but the web
form then fails Visual Studio XHTML validation with this error:
Cannot switch views: Validation (ASP.Net): Element '' is missing the '>' character
from its closing tag.
Besides the issue with the
tag, the web form does its best to translate the desired CSS
style properties to HTML 3.2 tags for the old Netscape browser. For the most part, it does a good
job, especially with text. Viewing the HTML source shows how this compatibility was achieved:
style="text-decoration:underline;">color="Blue">Rob
The style attribute is still present because we used the Style collection for setting the
text-decoration attribute in the code-behind class.


Pages:
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240