Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.

XML
<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>
Posted
Updated 14-Jun-13 20:38pm
v2

1 solution

u can display vertical using table structure inside item template pls see following i hope it's help you

C#
<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>
 
Share this answer
 
v2
Comments
ntitish 15-Jun-13 3:08am    
sir, actually i have to display three controls side by side i mean in one tr only i want to display
PRAKASH9 15-Jun-13 3:13am    
|image|image|image|
|link |link |link |
|chk |ch |chk | u want to display like this right
ntitish 15-Jun-13 3:27am    
no sir
image|linkbtn|chk
image|linkbtn|chk
image|linkbtn|chk

PRAKASH9 15-Jun-13 3:54am    
so u can use like this <tr><td>image</td><td>link</td><td>chk</td></tr>

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900