首页 > 开发 > 综合 > 正文

使用DataList进行3层编历

2024-07-21 02:25:09
字体:
来源:转载
供稿:网友
        <asp:datalist enableviewstate="false" id="datalistmagcat" runat="server" repeatcolumns="1" width="350" bordercolor="black" borderwidth="1" gridlines="both" cellpadding="3" font-name="verdana" font-size="8pt" headerstyle-backcolor="#aaaadd" alternatingitemstyle-backcolor="#eeeeee" selecteditemstyle-backcolor="yellow" onitemcommand="datalist_itemcommand" oncancelcommand="datalist_cancelcommand" allowpaging="true" pagesize="30" pagerstyle-mode="numericpages">
                            <selecteditemstyle backcolor="yellow"></selecteditemstyle>
                            <headertemplate>
                                目录
                                <br>
                                <div align="center">
                                    <asp:adrotator advertisementfile="advs/advs.xml" runat="server" bordercolor="#000000" borderwidth="0" id="adrotator1" target="_new"></asp:adrotator>
                                </div>
                            </headertemplate>
                            <selecteditemtemplate></selecteditemtemplate>
                            <alternatingitemstyle backcolor="#eeeeee"></alternatingitemstyle>
                            <itemtemplate>
                                <asp:lable id="lbcattitlelevel1">
                                    <span class="cat1">
                                        <%# databinder.eval(container.dataitem, "cattitle")%>
                                    </span>
                                </asp:lable>
                                <asp:datalist enableviewstate="false" id="datalisttest" datasource='<%# showsubcat((int)databinder.eval(container.dataitem,"magid"),(int)databinder.eval(container.dataitem,"magyear"), (int)databinder.eval(container.dataitem,"yearissue"), (int)databinder.eval(container.dataitem,"catid"))%>' runat="server" repeatcolumns="1" width="100%" bordercolor="black" borderwidth="1" gridlines="both" cellpadding="3" font-name="verdana" font-size="8pt" headerstyle-backcolor="#aaaadd" alternatingitemstyle-backcolor="#eeeeee" selecteditemstyle-backcolor="yellow" onitemcommand="datalist_itemcommand" oncancelcommand="datalist_cancelcommand" allowpaging="true" pagesize="30" pagerstyle-mode="numericpages">
                                    <itemtemplate>
                                          
                                        <asp:lable id="lbcattitlelevel2">
                                            <span class="cat2">
                                                <%# databinder.eval(container.dataitem, "cattitle")%>
                                            </span>
                                        </asp:lable>
                                        <asp:datalist enableviewstate="false" id="datalist1" datasource='<%# showsubcat((int)databinder.eval(container.dataitem,"magid"),(int)databinder.eval(container.dataitem,"magyear"), (int)databinder.eval(container.dataitem,"yearissue"), (int)databinder.eval(container.dataitem,"catid"))%>' runat="server" repeatcolumns="1" width="100%" bordercolor="black" borderwidth="1" gridlines="both" cellpadding="3" font-name="verdana" font-size="8pt" headerstyle-backcolor="#aaaadd" alternatingitemstyle-backcolor="#eeeeee" selecteditemstyle-backcolor="yellow" onitemcommand="datalist_itemcommand" oncancelcommand="datalist_cancelcommand" allowpaging="true" pagesize="30" pagerstyle-mode="numericpages">
                                            <itemtemplate>
                                                    
                                                <asp:lable id="lbcattitlelevel3">
                                                    <span class="cat3">
                                                        <%# databinder.eval(container.dataitem, "cattitle")%>
                                                    </span>
                                                </asp:lable>
                                                <asp:datalist enableviewstate="false" id="datalistshowmagarttitleleve3" datasource='<%# showmagarttitle((int)databinder.eval(container.dataitem, "ciid"))%>' runat="server" repeatcolumns="1" width="100%" bordercolor="black" borderwidth="1" gridlines="both" cellpadding="3" font-name="verdana" font-size="8pt" headerstyle-backcolor="#aaaadd" alternatingitemstyle-backcolor="#eeeeee" selecteditemstyle-backcolor="yellow" onitemcommand="datalist_itemcommand" oncancelcommand="datalist_cancelcommand" allowpaging="true" pagesize="30" pagerstyle-mode="numericpages">
                                                    <itemtemplate>
                                                            
                                                        <asp:linkbutton id="lbarttitlelevel3" runat="server" text='<%# databinder.eval(container.dataitem, "mainheader")%>' />
                                                    </itemtemplate>
                                                </asp:datalist>
                                            </itemtemplate>
                                        </asp:datalist>
                                        <asp:datalist enableviewstate="false" id="datalistshowmagarttitleleve2" datasource='<%# showmagarttitle((int)databinder.eval(container.dataitem, "ciid"))%>' runat="server" repeatcolumns="1" width="100%" bordercolor="black" borderwidth="1" gridlines="both" cellpadding="3" font-name="verdana" font-size="8pt" headerstyle-backcolor="#aaaadd" alternatingitemstyle-backcolor="#eeeeee" selecteditemstyle-backcolor="yellow" onitemcommand="datalist_itemcommand" oncancelcommand="datalist_cancelcommand" allowpaging="true" pagesize="30" pagerstyle-mode="numericpages">
                                            <itemtemplate>
                                                    
                                                <asp:linkbutton id="lbarttitlelevel2" runat="server" text='<%# databinder.eval(container.dataitem, "mainheader")%>' />
                                            </itemtemplate>
                                        </asp:datalist>
                                    </itemtemplate>
                                    
                                    
                                    
                                </asp:datalist>
                                <asp:datalist enableviewstate="false" id="datalistshowmagarttitleleve1" datasource='<%# showmagarttitle((int)databinder.eval(container.dataitem, "ciid"))%>' runat="server" repeatcolumns="1" width="100%" bordercolor="black" borderwidth="1" gridlines="both" cellpadding="3" font-name="verdana" font-size="8pt" headerstyle-backcolor="#aaaadd" alternatingitemstyle-backcolor="#eeeeee" selecteditemstyle-backcolor="yellow" onitemcommand="datalist_itemcommand" oncancelcommand="datalist_cancelcommand" allowpaging="true" pagesize="30" pagerstyle-mode="numericpages">
                                    <itemtemplate>
                                            
                                        <asp:linkbutton id="lbarttitlelevel1" runat="server" text='<%# databinder.eval(container.dataitem, "mainheader")%>' />
                                    </itemtemplate>
                                </asp:datalist>
                            </itemtemplate>
                            <headerstyle backcolor="#aaaadd"></headerstyle>
                        </asp:datalist>

最大的网站源码资源下载站,

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表