Hello ,
how could i write this in the aspx page :
<%# If (Eval("discount") <> "") Then%><div style="width:900px; float:left;"><strong>Discount%:</strong> <asp:Label ID="discountLabel" runat="server" Text='<%# Eval("discount") %>' /></div><%end if %>
Now i get the following error:
Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control. Thank you