开发者

VS2008 Complains about css class names it should know about

I've seen this in a webcast somewhere, but I can't remember where, and all searching terms I'm trying are coming up unhelpful.

I've got a stylesheet for my site, and it's referenced in a master page. Child pages that use this master page use these styles, but .Net doesn't know about them. When the site is run, it all works great, but I'm trying to figure out how to get .Net to know about them at design time.

This should also fix the issue with not knowing about the javascript files I'm including, too -- I think it's all related and I can't for the life of me figure out how.

EDIT: I'm an idiot. This is the code that was being used to include the stylesheet.

<link href="<%= ResolveUrl("~/") %>css/styles.css" rel="stylesheet" type="text/css" />

I hate 开发者_高级运维people who overthink things. Oh, and people who are too stupid to fully investigate an issue before they ask a question. Like me.


You can try using View->Manage Styles which brings up a list of the css that you can use in your pages at design time.

UPDATE: Actually how are you creating your child page? I just noticed that i have complete access to stylesheet classes that are referenced in master page.

I created child page as 'web content form' & then specified the master page. Then in my child page when i try to add cssclass to a label, it gives me a list of styles from the stylesheet referenced in master page.


I think it's just a limitation of Visual Studio's designer. It can't know all of the possible combinations of master pages/child pages, so it just seems to be a bit pessamistic at times. I wouldn't worry about it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜