<span id="mktg5"></span>

<i id="mktg5"><meter id="mktg5"></meter></i>

        <label id="mktg5"><meter id="mktg5"></meter></label>
        最新文章專題視頻專題問答1問答10問答100問答1000問答2000關鍵字專題1關鍵字專題50關鍵字專題500關鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關鍵字專題關鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
        問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
        當前位置: 首頁 - 科技 - 知識百科 - 正文

        asp.net實現DataList與Repeater嵌套綁定的方法

        來源:懂視網 責編:小采 時間:2020-11-27 22:37:48
        文檔

        asp.net實現DataList與Repeater嵌套綁定的方法

        asp.net實現DataList與Repeater嵌套綁定的方法:本文實例講述了asp.net實現DataList與Repeater嵌套綁定的方法。分享給大家供大家參考,具體如下: <%@ Page Language=C# AutoEventWireup=true CodeFile=home.aspx.cs Inherits=home %> <body&
        推薦度:
        導讀asp.net實現DataList與Repeater嵌套綁定的方法:本文實例講述了asp.net實現DataList與Repeater嵌套綁定的方法。分享給大家供大家參考,具體如下: <%@ Page Language=C# AutoEventWireup=true CodeFile=home.aspx.cs Inherits=home %> <body&

        本文實例講述了asp.net實現DataList與Repeater嵌套綁定的方法。分享給大家供大家參考,具體如下:

        <%@ Page Language="C#" AutoEventWireup="true" CodeFile="home.aspx.cs" Inherits="home" %>
        <body>
         <form id="form1" runat="server">
         <asp:DataList ID="monitorTypeList" runat="server" RepeatColumns="4" 
         onitemdatabound="monitorTypeList_ItemDataBound" RepeatDirection="Horizontal" ItemStyle-VerticalAlign="Top">
         <ItemTemplate>
         <table class="conBox" width="186" border="0" cellpadding="0" cellspacing="1" style="margin-right:10px;">
         <tr>
         <th><a href="<%#Eval("plugpath") %>"><%#Eval("monitor_type_name") %></a></th>
         </tr>
         <asp:Repeater ID="monitorConfigList" runat="server">
         <ItemTemplate>
         <tr>
         <td><a href="<%#Eval("plugpath") %>?monitor_id=<%#Eval("monitor_id") %>"><%#Eval("monitor_name") %></a></td>
         </tr>
         </ItemTemplate>
         </asp:Repeater>
         </table>
         </ItemTemplate>
         </asp:DataList>
         </form>
        </body>
        
        

        home.aspx.cs

        using System;
        using System.Collections;
        using System.Configuration;
        using System.Data;
        using System.Linq;
        using System.Web;
        using System.Web.Security;
        using System.Web.UI;
        using System.Web.UI.HtmlControls;
        using System.Web.UI.WebControls;
        using System.Web.UI.WebControls.WebParts;
        using System.Xml.Linq;
        public partial class home : System.Web.UI.Page
        {
         protected void Page_Load(object sender, EventArgs e)
         {
         myCheck.IsLoginNonReturn();
         if (!IsPostBack)
         {
         Bind_monitorTypeList();
         }
         }
         protected void Bind_monitorTypeList()
         {
         string sql = "select monitor_type_id,monitor_type_name from monitor_type";
         DbConn conn = new DbConn();
         DataSet ds = conn.DataSet(sql,"monitor_type");
         monitorTypeList.DataSource = ds.Tables[0];
         monitorTypeList.DataBind();
         ds.Dispose();
         conn.Close();
         }
         protected void monitorTypeList_ItemDataBound(object sender, DataListItemEventArgs e)
         {
         if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
         {
         string monitor_type_id = ((DataRowView)e.Item.DataItem).Row["monitor_type_id"].ToString();
         Repeater monitorConfigList = (Repeater)e.Item.FindControl("monitorConfigList");
         if (monitorConfigList != null)
         {
         string sql = "select monitor_id,nonitor_name,plugpath from monitor where monitor_type_id=" + monitor_type_id;
         DbConn conn = new DbConn();
         DataSet ds = conn.DataSet(sql, "monitor");
         monitorConfigList.DataSource = ds.Tables[0];
         monitorConfigList.DataBind();
         ds.Dispose();
         conn.Close();
         }
         }
         }
        }
        
        

        更多關于asp.net相關內容感興趣的讀者可查看本站專題:《asp.net文件操作技巧匯總》、《asp.net ajax技巧總結專題》及《asp.net緩存操作技巧總結》。

        希望本文所述對大家asp.net程序設計有所幫助。

        聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

        文檔

        asp.net實現DataList與Repeater嵌套綁定的方法

        asp.net實現DataList與Repeater嵌套綁定的方法:本文實例講述了asp.net實現DataList與Repeater嵌套綁定的方法。分享給大家供大家參考,具體如下: <%@ Page Language=C# AutoEventWireup=true CodeFile=home.aspx.cs Inherits=home %> <body&
        推薦度:
        標簽: 綁定 嵌套 data
        • 熱門焦點

        最新推薦

        猜你喜歡

        熱門推薦

        專題
        Top
        主站蜘蛛池模板: 国产亚洲欧美日韩亚洲中文色| 亚洲成av人影院| 亚洲男同gay片| 成年女人午夜毛片免费视频| 久久亚洲精品人成综合网| 亚洲网站免费观看| 亚洲国产亚洲片在线观看播放| 成人免费在线看片| 亚洲综合色丁香婷婷六月图片| 午夜毛片不卡高清免费| 亚洲av成人一区二区三区在线播放| 精品久久久久久久免费人妻| 337P日本欧洲亚洲大胆艺术图| 免费国产成人高清在线观看麻豆| 一级毛片免费全部播放| 亚洲日韩精品一区二区三区无码| 国产成人AV片无码免费| 亚洲国产精品综合久久久| 成人性生交大片免费看午夜a| 亚洲JIZZJIZZ妇女| 亚洲精品无码AV中文字幕电影网站 | 亚洲国产人成在线观看| 搡女人免费视频大全| 特黄特色大片免费| 亚洲精品无码午夜福利中文字幕| 十八禁无码免费网站 | 亚洲aⅴ无码专区在线观看| 亚洲一级特黄无码片| 久久青草免费91线频观看站街| 亚洲日韩国产精品无码av| 精品国产麻豆免费网站| 久久国产乱子伦精品免费午夜| 亚洲一区二区三区首页| 免费国产a国产片高清| 色www永久免费网站| 亚洲中文字幕一二三四区| 久久久久亚洲AV成人网人人网站| 4虎1515hh永久免费| 男人j进女人p免费视频| 亚洲神级电影国语版| 亚洲中文字幕成人在线|