How to stop Visual Studio css intellisense breaking when css is added via a custom control


Tags: css,visual-studio-2008,intellisense,custom-server-controls

Problem :

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.



Solution :

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


    CSS Howto..

    How to create fixed to screen layout

    How to select only one child element in CSS?

    How to write Text in css like show in images?

    ASP.NET - IIS 7 - DotNetNuke - How do I force browsers to reload the site's CSS?

    How to stop css animation in current position on hover?

    How can I align centered inline-block elements correctly?

    how to make button in ionic + css

    How can I implement “CSS versioning” (to solve cache issues) using JSF 2 h:outputStylesheet?

    How can I have two divs inside a container such that when resizing one the other automatically resizes to fill the container?

    How to center verticaly n inline containers with different font-size?

    CSS: can't understand how to work with the z-index

    how to indent jqgrid table?

    How to minify and combine commented out css files

    Images not showing up in IE 9

    how to crop big image in bootstrap carousel

    How to load jQuery before CSS code?

    How to convert a CSS3 2D animatuon to a 3D Transform

    How do I align tables with HTML?

    How to use jQueryUI tootip along with my custom css

    How to change the width of dynamically generated list boxes, based on user input?

    How can I change my code from PHP to HTML?

    How to Limit the Div Exactly into the Screen Size

    Using CSS, how to rotate a 3D box 180 degrees on mouse enter and continue to 360 on leave?

    My dropdown menu isn't showing below parent

    How to use regex to match css elements

    How to switch between custom css layout and bootstrap css layout

    How can I set -webkit-mask-box-image through javascript?

    How to change the scrolling text in CSS or JQuery

    DropDown Menu won't show for more than a second..not working.

    How to wrap entire line with overline and underline , until the end of the line ?