I’m trying this code to access a property but it gives me an error:
<textarea class="<%#Eval("soort").ToString() %>" ID="TextTranslation" runat="server" rows="5"><%#Eval("Translation") %></textarea>
The error:
Server Error in ‘/’ Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.Parser Error Message: The server tag is not well formed.
Source Error:
Line 17:
Line 18: <%# (Eval(“IsoCode”).ToString() != Eval(“Default”).ToString()) ? ” hidden” : “” %>”>
Line 19: ” ID=”TextTranslation” runat=”server” rows=”5″><%#Eval(“Translation”) %>
Line 20:
Line 21:Source File: /assets/usercontrols/TranslationControl.ascx Line: 19
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
Change your quotes to: class='<%#Eval(“soort”).ToString() %>’