Click here to Skip to main content
15,905,325 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Datalist2.aspx.cs" Inherits="Datalist2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head  runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1"  runat="server">
    <div>
        <asp:DataList ID="DataList1" runat="server" RepeatColumns="3" 
            RepeatDirection="Horizontal" RepeatLayout="Flow" DataKeyField="empId" 
            DataSourceID="SqlDataSource1">
            <itemtemplate>
                empId:
                <asp:Label ID="empIdLabel" runat="server" Text='<%# Eval("empId") %>' />
                <br />
                empName:
                <asp:Label ID="empNameLabel" runat="server" Text='<%# Eval("empName") %>' />
                <br />
                EmpDesignation:
                <asp:Label ID="EmpDesignationLabel" runat="server" 
                    Text='<%# Eval("EmpDesignation") %>' />
                <br />
                <br />
            </itemtemplate>
        
    
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:Expt %>" 
            SelectCommand="SELECT * FROM [tblEmployee]">
    
    </div>
    </form>
</body>
</html>
Posted

1 solution

Hi

I think Repeat column and Direction are for the Table layout. Not for flow layout.

Try using some CSS
 
Share this answer
 
Comments
Member-2338430 11-Feb-14 3:30am    
same problem I have.do you find any solution

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