婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 知識(shí)庫 > repeater 分列顯示以及布局的實(shí)例代碼

repeater 分列顯示以及布局的實(shí)例代碼

熱門標(biāo)簽:百度地圖標(biāo)注點(diǎn)擊事件 怎樣在地圖標(biāo)注消火栓圖形 濟(jì)源人工智能電話機(jī)器人價(jià)格 杭州智能電話機(jī)器人 內(nèi)蒙古智能電銷機(jī)器人哪家強(qiáng) 山東防封電銷卡辦理套餐 廈門四川外呼系統(tǒng) 地圖標(biāo)注位置多的錢 泰州手機(jī)外呼系統(tǒng)軟件

前臺(tái)

復(fù)制代碼 代碼如下:

div>
        table>
            tr>
                asp:Repeater ID="Repeater1" runat="server" OnItemDataBound="Repeater1_ItemDataBound">
                    ItemTemplate>
                        td>
                            table>
                                tr>
                                    td colspan="2">
                                        img src='%#"images/"+Eval("FoodPicture") %>' />
                                    /td>
                                /tr>
                                tr>
                                    td colspan="2">
                                        asp:Label ID="Label1" runat="server" Text='%#Eval("FoodName") %>'>/asp:Label>
                                    /td>
                                /tr>
                                tr>
                                    td>
                                        asp:Label ID="Label2" runat="server" Text=' %#Eval("FoodPrice") %>'>/asp:Label>
                                    /td>
                                    td>
                                        input type="image" src="images/product_add.png" onclick="product_add() " />
                                        %--    asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="images/product_add.png" />--%>
                                        asp:TextBox ID="TextBox1" Text="1" runat="server" Width="15px" ReadOnly="True">/asp:TextBox>
                                        input type="image" src="images/product_reduce.png" onclick="product_reduce()" />
                                        %--asp:ImageButton ID="ImageButton2" runat="server" ImageUrl="images/product_reduce.png" />--%>
                                    /td>
                                /tr>
                                tr>
                                    th colspan="2">
                                        asp:ImageButton ID="ImageButton3" ImageUrl="images/btn_order.gif" runat="server" />
                                    /th>
                                /tr>
                            /table>
                        /td>
                    /ItemTemplate>
                /asp:Repeater>
            /tr>
        /table>
    /div>


后臺(tái)

復(fù)制代碼 代碼如下:

  public   int i = 1;               

protected void Page_Load(object sender, EventArgs e)

        {

            string sqlstr = @"data source=PC-LENOVE\SQLEXPRESS;initial catalog=KFC;USER ID=SA;PASSWORD=abing520";

            SqlConnection con = new SqlConnection(sqlstr);

            SqlCommand cmd = new SqlCommand();

            cmd.CommandText = "SELECT * FROM Foods";

            cmd.Connection = con;

            SqlDataAdapter adapter = new SqlDataAdapter(cmd);

            DataTable dt = new DataTable();

            adapter.Fill(dt);

            cmd.Dispose();

            con.Dispose();

            this.Repeater1.DataSource = dt;

            this.Repeater1.DataBind();

        }

        protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e)

        {

            if (i % 4 == 0)//4是一行顯示列數(shù)

            {

                e.Item.Controls.Add(new LiteralControl("/tr>tr>"));

            }

            i++;

        }


您可能感興趣的文章:
  • Repeater的FooterTemplate顯示某列總計(jì)思路與代碼
  • Repeater控件動(dòng)態(tài)變更列(Header,Item和Foot)信息實(shí)現(xiàn)思路
  • Repeater對(duì)數(shù)據(jù)進(jìn)行格式化處理
  • Repeater全選刪除和分頁實(shí)現(xiàn)思路及代碼
  • ASP.NET中repeater嵌套實(shí)現(xiàn)代碼(附源碼)
  • Repeater與ListView功能概述及使用介紹
  • Repeater控件數(shù)據(jù)導(dǎo)出Excel(附演示動(dòng)畫)
  • asp.net中讓Repeater和GridView支持DataPager分頁
  • 在jquery repeater中添加設(shè)置日期,下拉,復(fù)選框等控件
  • Repeater控件動(dòng)態(tài)變更列(Header,Item和Foot)信息(重構(gòu)cs)

標(biāo)簽:洛陽 喀什 百色 朝陽 臺(tái)州 新鄉(xiāng) 朔州 周口

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《repeater 分列顯示以及布局的實(shí)例代碼》,本文關(guān)鍵詞  repeater,分列,顯示,以及,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《repeater 分列顯示以及布局的實(shí)例代碼》相關(guān)的同類信息!
  • 本頁收集關(guān)于repeater 分列顯示以及布局的實(shí)例代碼的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    主站蜘蛛池模板: 阿克陶县| 天津市| 永春县| 乳源| 华亭县| 清流县| 栾川县| 仲巴县| 疏勒县| 鄢陵县| 元江| 靖边县| 玛多县| 金山区| 灵山县| 镇雄县| 永清县| 庆城县| 沙河市| 海门市| 青川县| 贡嘎县| 肃南| 松潘县| 靖宇县| 怀集县| 永福县| 临西县| 荣成市| 修文县| 寻乌县| 盐亭县| 沈丘县| 灵山县| 玛沁县| 江川县| 榕江县| 永平县| 海伦市| 冕宁县| 上栗县|