Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 30, 2007 09:54 PM by garyseven
Jan 29, 2007 08:07 PM|LINK
here is an example of how I declare the vertical nav menu in an ascx control:
<asp:Menu ID="LeftNavMenuSiteMap" runat="server" Orientation="Vertical" DataSourceID="LeftNavMenuSiteMapDS" CssSelectorClass="PrettyMenu"></asp:Menu>
The only problem is the line "CssSelectorClass"... won't validate. Intellisence says it is not a "member of Menu class". I tried changing it to CssClass=, but that certainly didn't work.
The menu displays correctly, but the IDE doesn't like it for some reason.
Jan 30, 2007 05:54 PM|LINK
Jan 30, 2007 07:23 PM|LINK
I don't know anything about "expando" attributes. I'll have to learn more about that.
Will this validate as standards complient?
Jan 30, 2007 08:52 PM|LINK
The CssSelectorClass expando attribute is not passed through into the HTML that is rendered (produced) by the adapters. For example, go to this page,
http://www.asp.net/cssadapters/menu.aspx. Do a "view source" in your browser and search the HTML markup source for CssSelectorClass. You won't find it, though that expando attribute is present in the
server-side <asp:Menu> tag used for that page.
When you talk about "standards compliant" I'm assuming you mean compliant with, say, the W3C standards for XHTML 1.1, etc. Such standards apply to the HTML that is found in the rendered response that the page produces. Since the adapter-related expando
attributes won't be in that HTML that is rendered they do not impact, per se, whether or not the HTML is standards compliant.
VS may show compliance problems (or squiggles) with these expandos because it thinks you have superfluous attributes that may be passed through to the HTML... but for the adapted controls they won't cause true problems because the adapters don't pass these
Clear as mud?
Jan 30, 2007 09:54 PM|LINK
Hi Russ; thank you for your thoughtful response! Yes, I was referring to W3C standards, and I have extensivly viewed the generated html from the adapters, that's why I never seen the "expando" attribute.
Yes, VS complains as one expects, and at first I was a bit perplexed but you have resolved this for me! I'll pay no attention to the IDE related to this for now.
Oh and by the way, related to the browser crash item -- I haven't been able to generate anymore crashes since yesterday morning. Hmmmmm...
sorry for the secret referrence! :)