&LT;链接相对=&QUOT;样式&QUOT;类型= QUOT;文/ CSS&QUOT; HREF =&QUOT;&LT;%RESOLVEURL(QUOT;〜/ CSS / test.css&QUOT;)%GT;&QUOT; /&GT; [英] <link rel="Stylesheet" type="text/css" href="<% ResolveUrl("~/Css/test.css") %>"/>
问题描述
Error 5 ; expected
<link rel="Stylesheet" type="text/css" href="<% ***ResolveUrl("~/Css/test.css");*** %>"/>
我是否需要给;
在这里为我的解决方案是不是还在工作启动提供了一些其他错误
Do i need to give ;
over here as my solution is not still working it starts giving some other error
推荐答案
您需要添加一个等号,就像这样:
You need to add an equals sign, like this:
<link rel="Stylesheet" type="text/css" href="<%= ResolveUrl("~/Css/test.css") %>"/>
说明:
&LT;%%GT;
块插入整个陈述或块到生成的函数。如果要声明一个变量,开始一个循环,或运行一个独立的语句,使用&LT;%%GT;
块。块中的code必须是一个完整的语句;它被插在该方法的中间
<% %>
blocks insert entire statements or blocks into the generated function. If you want to declare a variable, start a loop, or run a stand-alone statement, use a <% %>
block. The code in the block must be a complete statement; it gets inserted in the middle of the method.
&LT;%=%GT;
块计算一个前pression并打印结果;当你想调用一个方法或读取变量并输出结果中使用它们。块中的code必须是一名前pression;它变成了一个方法调用的参数。
<%= %>
blocks evaluate an expression and print the result; use them when you want to call a method or read a variable and output the result. The code in the block must be an expression; it turn into an argument for a method call.
这篇关于&LT;链接相对=&QUOT;样式&QUOT;类型= QUOT;文/ CSS&QUOT; HREF =&QUOT;&LT;%RESOLVEURL(QUOT;〜/ CSS / test.css&QUOT;)%GT;&QUOT; /&GT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!