![](/img/trans.png)
[英]How to set the visibility of a control in ASP.NET inside the DataList control?
[英]how to change column width inside datalist control in asp.net
我有一个datalist
控件,其中数据显示在3 <td>
,如html
所示。
<asp:DataList ID="DataList1" runat="server"
onitemdatabound="DataList1_ItemDataBound" Width="400px">
<ItemTemplate>
<table style="width: 130px"><tr><td style="width:65px;">
<asp:Image ID="Image1" runat="server" Width="59px" Height="60px"
ImageUrl='<%# "~/User/UserPic/" + Eval("reg_pic") %>' /></td>
<td style="width:162px;" class="wdth150">
<asp:Label
ID="lbl_nam" runat="server" Text='<%# Eval("reg_nam") %>' ForeColor="White"></asp:Label><br />
<asp:Label ID="lbl_ad" runat="server" Text='<%# Eval("reg_age") %>'
ForeColor="White"></asp:Label>
</td><td style="width:109px" class="wdth120"></td><td>
<asp:LinkButton ID="LinkButton2" runat="server">Proceed</asp:LinkButton></td></tr>
</table>
</ItemTemplate>
</asp:DataList>
我的问题是这些记录显示得非常紧密,我想显示它们之间的间隙,我尝试使用style="width:120px"
但这style="width:120px"
。
采用
<table cellpadding="0" cellspacing="0" width="100%">
并尝试以percentage
而不是Pixels
给出宽度...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.