I have the following code:
<link rel="stylesheet" type="text/css" href="<%= GlobalVar.BasePath %>/css/style.css" />
the c# code is rendered as text, but the following works:
<link rel="stylesheet" type="text/css" href=<%= "\"" + GlobalVar.BasePath %>/css/style.css" />
Just curious, what is the solution to render it normally like I did in the first example?
I just want to know why it renders as text.
Not sure why you’re getting the issues, but you could solve the problem of using the GlobalVar by programmatically adding the css link: