ASP.NET 4 Parser Error

后端 未结 4 542
一生所求
一生所求 2021-01-24 03:05

I received a asp.net 2 to upgrade to .net 4. While most of it went well I\'m stuck on a line that can\'t find a solution for it.

I get a Parser Error Message: The

相关标签:
4条回答
  • 2021-01-24 03:23

    you need to use single quotes when setting tag values that contain the Eval() expression. The reason being is the double quotes that Eval takes.

    0 讨论(0)
  • 2021-01-24 03:29

    you have messed with " try :

       <li><a class='tooltip viewPolicyLink' rel='<%#Eval("key")%>'
                      title='<%#Eval("value")%>'
                      href='<%#ResolveUrl("~/Views/Pages/ViewPolicy.aspx")%>'
                      runat="server"><%#Eval("key")%></a></li>
    
    0 讨论(0)
  • 2021-01-24 03:40

    Try using single quotes for the attributes containing server-side commands:

    <li><a class="tooltip viewPolicyLink" rel='<%#Eval("key")%>'
                  title='<%#Eval("value")%>'
                  href='<%#ResolveUrl("~/Views/Pages/ViewPolicy.aspx")%>'
                  runat="server"><%#Eval("key")%></a></li>
    
    0 讨论(0)
  • 2021-01-24 03:43

    Double quotes are nested in rel, title, href attributes.

    0 讨论(0)
提交回复
热议问题