标题:高手近来看看,这个问题怎么解决!!
取消只看楼主
lange2741
Rank: 1
等 级:新手上路
帖 子:26
专家分:0
注 册:2007-10-16
 问题点数:0 回复次数:0 
高手近来看看,这个问题怎么解决!!
以下是代码:     
   <asp:Repeater ID="Repeater1" runat="server" DataSourceID="AccessDataSource5" OnItemCommand="Repeater1_ItemCommand">
        <ItemTemplate >
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%;">
            <tr>
                <td colspan="2" style="height: 30px; vertical-align: middle;">
                    <asp:Label ID="Label1" runat="server" Style="font-weight: bold; font-size: 14px;
                        margin-left: 30px; font-family: 新宋体; vertical-align: bottom; text-align: center;" ><%# Eval("bigclass") %></asp:Label>
                    <hr style="border-right: gainsboro 1px dashed; border-top: gainsboro 1px dashed;
                        vertical-align: bottom; border-left: gainsboro 1px dashed; width: 98%; border-bottom: gainsboro 1px dashed;
                        height: 1px; text-align: center" />
                </td>
            </tr>
            <tr>
                <td style="width: 10%; margin-top: 30px; vertical-align: top; text-align: left;">
                    <asp:Image ID="Image1" runat="server" ImageUrl="~/img/12.jpg" Style="margin-top: 5px;
                        margin-left: 35px" /></td>
                <td style="width: 80%; margin-top: 5px; font-size: 12px; font-family: 新宋体;">
                    <asp:DataList ID="DataList1" runat="server" DataSourceID="datalist"
                        RepeatColumns="2" Style="margin-top: 5px; margin-left: 10px" Width="98%" DataKeyField="id">
                        <ItemTemplate>
                            <asp:Label ID="smallclassLabel" runat="server" Text='<%# Eval("smallclass") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:DataList>
<asp:AccessDataSource ID="datalist" runat="server" DataFile="~/App_Data/news.mdb"
                        SelectCommand="SELECT [id], [smallclass], [bigclassid] FROM [small] WHERE ([bigclassid] = ?)">
                        <SelectParameters>
                            <asp:ControlParameter ControlID="Label1"  Name="bigclassid" PropertyName="Text" Type="Decimal"  />
                        </SelectParameters>
                    </asp:AccessDataSource>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="height: 15px">
                </td>
            </tr>
        </table>
        </ItemTemplate>
        </asp:Repeater>
        <asp:AccessDataSource ID="AccessDataSource5" runat="server" DataFile="~/App_Data/news.mdb"
            SelectCommand="SELECT  [id], [bigclass] FROM [bigclass]"></asp:AccessDataSource>

想得到的效果:


现在是他只显示分类不显示标题 ,也就是 datalist 不能根据label1的值来显示数据,这个如何解决!  
设计的要求是能把所有分类和其他的内容都显示出来,并能动态的修改,或者有其他好的方法?
搜索更多相关主题的帖子: runat Repeater Style 
2008-04-25 12:31



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-210999-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.185236 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved