expecting a ';' or an invalid '/'
This is probably something really simple that I am blind to see, but the errors being given are to vague to tell me where to look.
This line is telling me it is expecting ';'
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
I am using VS2010, MVC 2, and I am calling a parial view(ascx file) with this line
<%Html.RenderPartial("problemPage");%>
However for this line that calls the page I get, error CS1525: Invalid expression term '/'
Here is what is in the partial view(problemPage) that is supposedly where the problem is.
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<style type="开发者_如何学JAVAtext/css">
a.navfooter:link {color: #19abdc; text-decoration: underline; }
a.navfooter:visited {color: #19abdc; text-decoration: underline; }
a.navfooter:hover {color: #19abdc; text-decoration: underline; }
a.navquicklinks:active {color: #19abdc; }
</style>
<table width="170" border="0" align="center">
<tr>
<td align="center"><h1><a href="../about-this.php"><img src="<%: Url.Content(~/Content/Images/banner_left.gif) %>" width="120" height="600" border="0" /></a></h1>
<p> </p>
</td>
<td align="center"><img src="<%: Url.Content(~/Content/Images/ss.gif) %>" width="11" height="11" /></td>
</tr>
</table>
I have no idea where the invalid '/' would be in the page, and the expect ';' is already in the other page, please help. I feel like this should be a quick fix, but I have yet to see where my syntax error is.
Your Url.Content(...)
are not wrapped in quotes. E.G.
Url.Content(~/Content/Images/banner_left.gif)
should be
Url.Content("~/Content/Images/banner_left.gif")
精彩评论