asp.net - ASP dynamic stylesheet link href="<%=stylesheet%>" not working -


i've been searching explanation why following won't execute on server

<head runat="server">     <meta http-equiv="content-type" content="text/html; charset=utf-8">     <title></title>     <link href="<%=currentuser.ses.style.css%>" type="text/css" rel="stylesheet"> </head> 

but following execute fine

<link href="<%=currentuser.ses.style.css%>" type=text/css rel="stylesheet"> 

(notice missing "")

i've tried

<link href="<%=currentuser.ses.style.css%>" type="<%=response.contenttype = "text/css" %>" rel="stylesheet"> 

but change contenttype page , serve being css.

what doing wrong?

try ?

<link href="<%= string.format("{0}",currentuser.ses.style.css)%>" type="text/css" rel="stylesheet"> 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -