" / "> Error 5 ; expected

<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");***  %>"/>

I need to provide ;here, since my solution is not working yet, it starts to give some other error.

+3
source share
1 answer

You need to add an equal sign, for example:

<link rel="Stylesheet" type="text/css" href="<%= ResolveUrl("~/Css/test.css") %>"/>

Explanation:

<% %>blocks the insertion of entire statements or blocks into the generated function. If you want to declare a variable, run a loop or run a stand-alone statement, use a block <% %>. The code in the block must be a complete expression; it is inserted in the middle of the method.

<%= %> ; , . ; .

+13

Source: https://habr.com/ru/post/1725177/


All Articles