Posted By: JeremyJ | Mar 16th, 2006 @ 3:17 PM
page 1 of 1
Comments: 9 | Views: 16525
JeremyJ
JeremyJ
The pioneers would be appalled!
Does anyone know how to make a ASP.NET 1.1 radio button use the Windows XP visual style instead of the default style?  Is this even possible?
W3bbo
W3bbo
The Master of Baiters
Ah, the naive questions of the inexperienced ASP.NET dev who equates Webforms to Windows.forms Smiley

ASP.NET just generates (X)HTML, the HTML for a radio button is: <input type="radio" />, according to the W3C HTML Forms module specification, it is up to the browser implementation to render them appropriately; usually using native OS widgets. Obviously, UNIX browsers render it differently to Windows browsers.

Please think of ASP.NET in terms of the HTML generated, rather than how it looks in a specific browser on a specific platform, you do no-one any favors that way.


W3bbo
W3bbo
The Master of Baiters
JeremyJ wrote:
In ASP.NET 2.0 you can specify the Visual style.  I am wondering if the same thing is possible in ASP.NET 1.1 even if it is a bit more difficult to implement.


...where does it say that?

ASP.NET 2.0's "Skins" are something else, they just set some default CSS properties for the control elements. If you set even one CSS property on a native UI widget, then Firefox, Opera, and IE will all render the control using their own methods, but if you leave the elements alone then they're rendered as native UI widgets (and hence, with "visual styles")
Maurits
Maurits
AKA Matthew van Eerde
<META HTTP-EQUIV="MSThemeCompatible" CONTENT="yes">

Or (presumably) add a 
   MSThemeCompatible: Yes
header to the page
W3bbo
W3bbo
The Master of Baiters
Maurits wrote:
<META HTTP-EQUIV="MSThemeCompatible" CONTENT="yes">

Or (presumably) add a 
   MSThemeCompatible: Yes
header to the page


It says that doesn't explicity change anything, the meta is only there to turn them off.

Anyway, it's invalid Tongue Out

You'd want this...

<meta http-equiv="MSThemeCompatible" content="yes" />

...instead
Maurits
Maurits
AKA Matthew van Eerde
Right, the only way my link would help him is if he somehow had a content="no" on his web page.  Removing it would then re-enable the visual styles.

But it does contain the informative sentence "By default, visual styles are applied to Microsoft Internet Explorer 6"... which I probably should have quoted in my previous post Smiley
W3bbo
W3bbo
The Master of Baiters
Just a note, but in future, when using XML element names in CSS selectors, they should be lowercase, as strictly-speaking, CSS selectors are case-sensitive (indeed: IE isn't case-sensitive about classnames or id="" attributes, yet Gecko and Presto are)
page 1 of 1
Comments: 9 | Views: 16525
Microsoft Communities