G
Guest
Hi,
I'm more of a windows programmer than ASP and I've having a little
difficulty in ASP.Net (framework 2.0) - VB.net
I have a datagrid on an aspx page and the html is building the display in a
table row by row. A sample row being
<tr>
<td>Comment:</td>
<td><%# Databinder.Eval(Container.DataItem,"comment") %></td>
</tr>
I want to only write these rows where there is data. I think I need to mix
the asp <% and databound <%# elements in some way but maybe this is not going
to be possible ?
I tried to kick off by at least trying to blank out the label in the
following way (slightly desperate but I felt it might be a step in the right
direction!) but this doesn't work although I can't see why not
<%# DataBinder.Eval(Container.DataItem, "Comment").Equals("") & "":"Comment"
%>
VS is telling me a bracket is expected and thate there are 2 additional
unspecified syntax errors in this one line !
Thanks for any help on this!
Ben.
I'm more of a windows programmer than ASP and I've having a little
difficulty in ASP.Net (framework 2.0) - VB.net
I have a datagrid on an aspx page and the html is building the display in a
table row by row. A sample row being
<tr>
<td>Comment:</td>
<td><%# Databinder.Eval(Container.DataItem,"comment") %></td>
</tr>
I want to only write these rows where there is data. I think I need to mix
the asp <% and databound <%# elements in some way but maybe this is not going
to be possible ?
I tried to kick off by at least trying to blank out the label in the
following way (slightly desperate but I felt it might be a step in the right
direction!) but this doesn't work although I can't see why not
<%# DataBinder.Eval(Container.DataItem, "Comment").Equals("") & "":"Comment"
%>
VS is telling me a bracket is expected and thate there are 2 additional
unspecified syntax errors in this one line !
Thanks for any help on this!
Ben.