Validation(ASP.NET): If this attribute value is enclosed in quotation
marks, the quotation marks must match
I cannot seem to figure out why this isn't working for me, the second
expression of the ternary operator does not give me any trouble, however
the first expression gives me the error: Validation (ASP.Net): If this
attribute value is enclosed in quotation marks, the quotation marks must
match.
<asp:Label
ID="CategoryText"
CssClass='<%#
Convert.ToBoolean(DataBinder.Eval(Container.DataItem,
"IsSkipped")) ? "CategoryCell Skipped" : "CategoryCell" %>'
runat="server"
Text='<%# DataBinder.Eval(Container.DataItem,
"CategoryID").Equals(CurrentCategoryID) ?
"<%# DataBinder.Eval(Container.DataItem, \"Text\").ToString() %> "
// ^-- this is what is causing the error.
: "<%# GenerateQuestionURL(DataBinder.Eval(Container.DataItem,
\"CategoryID\").ToString(), DataBinder.Eval(Container.DataItem,
\"Text\").ToString() ) %> " %>'
/>
No comments:
Post a Comment