Click here to Skip to main content
15,908,674 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a question i want my data in table view. I have a recored in database which consist 1 column and multiple row in sql. and i want to display it in table view which consist of 3 row and 3 columns.
XML
<table border="2">
   <tr>
      <asp:Repeater id="Repeater2" runat="server" DataSourceID="SqlDataSource1">
         <ItemTemplate>
            <td> 
               <asp:Label ID="Label3" runat="server"  Text='<%# Eval("Well") %>'></asp:Label>
               </td>
            </ItemTemplate> 
         </asp:ListView>
      </tr> 
   </table>
   <asp:SqlDataSource ID="SqlDataSource1" runat="server"
      ConnectionString="<%$ ConnectionStrings:studentConnectionString %>"
      SelectCommand="SELECT * FROM [welcome]"></asp:SqlDataSource>
Posted
Updated 25-Jan-12 2:45am
v3
Comments
fjdiewornncalwe 25-Jan-12 8:47am    
Can you add a small sample of what you want your final output to look like, please? It would help us in understanding exactly what you want.

1 solution

ASP.NET
<table border="2">
   <tr>
      <asp:repeater id="Repeater2" runat="server" datasourceid="SqlDataSource1" xmlns:asp="#unknown">
         <itemtemplate>
            <td> 
               <asp:label id="Label3" runat="server" text="<%# Eval("Well") %>"></asp:label>
               </td>
            </itemtemplate> 
         
      </asp:repeater></tr> 
   </table>
-----------
Should be
-------------
      <asp:repeater id="Repeater2" runat="server" datasourceid="SqlDataSource1" xmlns:asp="#unknown">
         <itemtemplate>
<table border="2">
   <tr>
            <td> 
               <asp:label id="Label3" runat="server" text="<%# Eval("Well") %>"></asp:label>
               </td>
      </tr> 
   </table>
            </itemtemplate> 
         </asp:repeater>
 
Share this answer
 

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