I currently have a repeater item, that displays a text box and then a description of an item next to it with a link. not ll of the items have a link though, so I need to create an if statement in the repeater to oly show the link version if the database field url is not null. all my attempts so far have not worked. here is the code for the basic link. any help/guidance is appreciated. all my attempts have ended with the Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control. errer.
The area in question is simply the url string link.
td><asp:TextBox ID=txtBox Width=50 CssClass="CenterItem" runat=server ></asp:TextBox> <asp:HiddenField ID="hdnID" Value=<%# Eval("ID").ToString() %> runat=server /></td>
<td><a href="<%# Eval("url").ToString() %>"><%# Eval("title").ToString() %></a> - <%# Eval("NumPerBox").ToString() %> per box
<asp:RangeValidator ID="RangeValidator1" runat="server" ControlToValidate="txtBox" MinimumValue="0" MaximumValue="1500" ErrorMessage="Number must be between 0 and 1500."></asp:RangeValidator></td>