I have <% %> blocks already on my master page head tag and i want to register a css from code behind.
I have already tried the approach mentioned here
but that won’t work.
I tried something like this
<link type="text/css" href="<%= this.BaseUrl %>/styles/styles.css" />
Which did not work too.. it works for script references but not for css.
Any idea how can this be achieved?
Guys got it working…!
Never thought it would be this simple.. 😀
Here is the code:
Master page Head tag has :
master page code behind has following in page load: