views:

772

answers:

2

Hi all,

I have created a simple Asp.Net custom control which automatically combines all the correct stylesheets to send to the client (based on browser type/version/etc).

However, because at design-time the head tag looks something like this...

<head>
    <cc:CssControl runat="server" />
</head>

...VS is unable to provide intellisense for css class names. I've tried creating a ControlDesigner for the control that returns some hard-coded <link />'s by overridding GetDesignTimeHtml(), but that didn't seem to help either.

Anyone have any ideas for this?

Thanks,

Simon.

+5  A: 

This css intellisense doesn't work in usercontrols. I have almost tried everything to get it worked.

But you can try it in the user control just like we include jquery intellisense in UserControl. I havent tried it out yet.

<% if (false) { %>
<link rel="Stylesheet" href="style.css" type="text/css" />
<% } %>

I Hope it works

Barbaros Alp
Sweet; thank you. I'm glad there is SOME way to do this.
Jay
A: 

Thanks Barbaros.

I had thought about using the 'if (false)' trick for design-time, if it's the only way then I'll use it but I was hoping someone, somewhere had another idea!

Thanks again.

Simon