为什么datalist repeatdirection =" horizo​​ntal" repeatcoulmns = QUOT; 3英寸repeatlayout = QUOT;流速"不管用? [英] why datalist repeatdirection="horizontal" repeatcoulmns="3" repeatlayout="flow" is not working?

查看:58
本文介绍了为什么datalist repeatdirection =" horizo​​ntal" repeatcoulmns = QUOT; 3英寸repeatlayout = QUOT;流速"不管用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<%@ 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>

推荐答案

ConnectionStrings:Expt%>
SelectCommand =SELECT * FROM [tblEmployee]>

< / div>
< / form>
< / body>
< / html>
ConnectionStrings:Expt %>" SelectCommand="SELECT * FROM [tblEmployee]"> </div> </form> </body> </html>






我认为重复列和方向是表格布局。不适用于流程布局。



尝试使用一些CSS
Hi

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

Try using some CSS


这篇关于为什么datalist repeatdirection =&quot; horizo​​ntal&quot; repeatcoulmns = QUOT; 3英寸repeatlayout = QUOT;流速&QUOT;不管用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆