On Sat, Aug 29, 2009 at 4:39 AM, Suraj<[email protected]> wrote:
> Hi,
>
> I have 2 stylesheets in my project and all the pages are inheriting from a
> Master page.
>
> When i inherit a master page, the child's page code should be in
> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
> Runat="Server">
>
> </
>
> asp:Content>.
>
> If so, then how should i link my CSS pages into this child page?
>
> Regards,
>
> Su
>

Just put the typical link to the stylesheet in the Masterpage and use
the CSS as you would otherwise. No, you won't get intellisense, yes,
the compiler will warn you it can't find the classes, but it works
fine.

If you realllly want intellisense, try the "if false" trick on the
content page -- wrap a link to the stylesheet in an "if false" block.
It will therefore never render on the page, but the IDE should parse
it out and give you the Intellisense. (I've used this for .js ...
assuming it will work for .css. Let us know?)

Of course putting the stylesheet reference on every page, in some form
or another, means if you every change the name of the stylesheet,
you'll have to change every one of those references. Personally, I
live without intellisense on CSS ...

∞ Andy Badera
∞ This email is: [ ] bloggable [x] ask first [ ] private
∞ Google me: http://www.google.com/search?q=(andrew+badera)+OR+(andy+badera)

Reply via email to