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") %>"/>
Explanation:
<% %>
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.
<%= %>
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With