当 <%#DataBinder.Eval(Container.DataItem, "OptionD")%>的值为空时,怎样才能放他前面的“D”不显示
<asp:DataListID="DataList1"runat="server"BackColor="White"BorderColor="White"BorderSt...
<asp:DataList ID="DataList1" runat="server" BackColor="White" BorderColor="White"
BorderStyle="Double" CellPadding="4" Width="474px" Font-Size="9pt"
onselectedindexchanged="DataList1_SelectedIndexChanged">
<ItemTemplate>
</ItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%#this.AspNetPager1.CurrentPageIndex * this.AspNetPager1.PageSize + this. DataList1.Items.Count + 1-this.AspNetPager1.PageSize%>'></asp:Label>
<asp:Label ID="Label2" runat="server" Height="19px" Width="1px" Font-Size="9pt"></asp:Label> <%#DataBinder.Eval(Container.DataItem, "TestTitleContent")%>
<table style="width: 346px; font-size: 9pt;">
<tr>
<td colspan="3"></td>
</tr>
<tr>
<td rowspan="4" style="width: 42px">
<asp:RadioButtonList ID="RadioButtonList1" runat="server" Height="80px" Font-Size="9pt">
<asp:ListItem onclick="check(this)">A</asp:ListItem>
<asp:ListItem onclick="check(this)">B</asp:ListItem>
<asp:ListItem onclick="check(this)">C</asp:ListItem>
<asp:ListItem onclick="check(this)">D</asp:ListItem>
</asp:RadioButtonList>
</td>
<td colspan="2">
<%#DataBinder.Eval(Container.DataItem, "OptionA")%>
</td>
</tr>
<tr>
<td colspan="2">
<%#DataBinder.Eval(Container.DataItem, "OptionB")%>
</td>
</tr>
<tr>
<td colspan="2">
<%#DataBinder.Eval(Container.DataItem, "OptionC")%>
</td>
</tr>
<tr>
<td colspan="2">
<%#DataBinder.Eval(Container.DataItem, "OptionD")%>
</td>
</tr>
</table>
</ItemTemplate>
</asp:DataList> 展开
BorderStyle="Double" CellPadding="4" Width="474px" Font-Size="9pt"
onselectedindexchanged="DataList1_SelectedIndexChanged">
<ItemTemplate>
</ItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%#this.AspNetPager1.CurrentPageIndex * this.AspNetPager1.PageSize + this. DataList1.Items.Count + 1-this.AspNetPager1.PageSize%>'></asp:Label>
<asp:Label ID="Label2" runat="server" Height="19px" Width="1px" Font-Size="9pt"></asp:Label> <%#DataBinder.Eval(Container.DataItem, "TestTitleContent")%>
<table style="width: 346px; font-size: 9pt;">
<tr>
<td colspan="3"></td>
</tr>
<tr>
<td rowspan="4" style="width: 42px">
<asp:RadioButtonList ID="RadioButtonList1" runat="server" Height="80px" Font-Size="9pt">
<asp:ListItem onclick="check(this)">A</asp:ListItem>
<asp:ListItem onclick="check(this)">B</asp:ListItem>
<asp:ListItem onclick="check(this)">C</asp:ListItem>
<asp:ListItem onclick="check(this)">D</asp:ListItem>
</asp:RadioButtonList>
</td>
<td colspan="2">
<%#DataBinder.Eval(Container.DataItem, "OptionA")%>
</td>
</tr>
<tr>
<td colspan="2">
<%#DataBinder.Eval(Container.DataItem, "OptionB")%>
</td>
</tr>
<tr>
<td colspan="2">
<%#DataBinder.Eval(Container.DataItem, "OptionC")%>
</td>
</tr>
<tr>
<td colspan="2">
<%#DataBinder.Eval(Container.DataItem, "OptionD")%>
</td>
</tr>
</table>
</ItemTemplate>
</asp:DataList> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询