如何在垂直方向上显示ASP ListView项目 [英] How to display asp listview items in vertical direction
本文介绍了如何在垂直方向上显示ASP ListView项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
实际上,我在ASP ListView的项目模板中使用了三个控件.我将数据绑定到这三个控件,直到现在工作5n.但它是水平显示的.但我想垂直显示....有可能吗?
Actually i am taking three controls in item template of asp listview. i am binding the data to that three controls till now it is working 5n. but it is displaying horizontally . but i want to display vertically....is it possible.
<asp:ListView ID="ProvidersListView" runat="server" DataSourceID="sdsAttachedUsers" OnItemDataBound="ProvidersListView_ItemDataBound">
<ItemTemplate>
<asp:Image ID="imgincAct" runat="server" ImageUrl='images/imginctact.png' Style="height: 25px; width: 25px;" Visible="false" />
<asp:Image ID="imgAct" runat="server" ImageUrl='images/imgAct.png' Style="height: 25px; width: 25px;" Visible="false" />
<asp:Image Visible="false" ID="ImgAway" runat="server" ImageUrl='images/imgAway.png'
Style="height: 25px; width: 25px;" />
<asp:LinkButton ID="lblphyname" runat="server" CommandName="Selected" onclick="lblphyname_Click" ForeColor="#0489B5" Font-Size="11pt"
CommandArgument='<%# Eval("AssignedTo") %>' Text='<%# Eval("FullName") %>' Font-Underline="false" Font-Overline="false">
</asp:LinkButton><asp:CheckBox ID="chk" Width="50px" runat="server" Font-Size="1pt" />
<asp:Label ID="lblVName" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"UserID") %>'
Visible="false"></asp:Label>
<asp:Label ID="lbluseid" runat="server" Text='<%# Eval("Assignedto") %>' Visible="false"></asp:Label>
<asp:Label ID="lbUstatus" runat="server" Text='<%# Eval("Ustatus") %>' Visible="false"></asp:Label>
<asp:Label ID="email" runat="server" Text='<%# Eval("Email") %>' Visible="false"></asp:Label>
<asp:Label ID="lblSendEmailIfApplogoff" runat="server" Text='<%# Eval("SendEmailIfApplogoff") %>' Visible="false"></asp:Label>
</ItemTemplate>
</asp:ListView>
推荐答案
u可以在项目模板内部使用表格结构显示垂直信息,请参见以下内容,希望对您有所帮助
u can display vertical using table structure inside item template pls see following i hope it''s help you
<asp:listview id="ProvidersListView" runat="server" datasourceid="sdsAttachedUsers" onitemdatabound="ProvidersListView_ItemDataBound">
<itemtemplate>
<table>
<tr><td>Image</td></tr>
<tr><td>Linkbutton</td></tr>
<tr><td>label</td></tr>
</table>
</itemtemplate>
</asp:listview>
这篇关于如何在垂直方向上显示ASP ListView项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文