w3c validation error in asp.net

后端 未结 2 650
难免孤独
难免孤独 2021-01-25 07:03

I am new in W3c validations, I am trying to fix this error but it\'s not happening. The error is following:

character \"&\" is the first character of

相关标签:
2条回答
  • 2021-01-25 07:16

    & is a special charater for concat, you need to escape it: make them all & not &.

    0 讨论(0)
  • 2021-01-25 07:24

    Here is the solution I came up with:

    <asp:Label ID="lblDescription" runat="server" Text='<%# Server.HtmlEncode( (string) Eval("Decr")) %>'></asp:Label>
    
    0 讨论(0)
提交回复
热议问题