![](/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.