Quantcast
Channel: Visual Studio and Visual Web Developer Express
Viewing all articles
Browse latest Browse all 3509

Dynamic CSS link and intellisense

$
0
0

Hi all,

I have created a utility DLL, that allows the developers to create a link to a CSS file, by specifying the filename without needing to worry about the location of the file (or indeed the full filename, to accomodate for file versioning).

The developers reference these files like below:

<link rel="stylesheet" href="<%= ResourceBuilder.ResolveUrl("main.css") %>" />

The ResourceBuilder utility then resolves the file name to the full URL for the file. This all works (more or less) perfectly.

However, it throws up a complication: We've lost intellisense for the CSS classes within the CSS file.

I'm fairly sure that this is due to the filepath not actually being resolved at Design time, so VS doesn't actually have any awareness of the CSS file to load the intellisense from. But I'm not sure how to set this up to run at design time, so that we can have the intellisense.

Is this even possible? If so, how? Or is it something we just need to accept: That in return for the dynamic linking of the files, we have to sacrifice intellisense?

Thanks

Fergal


Viewing all articles
Browse latest Browse all 3509

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>