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

主頁 > 知識庫 > 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)軟件

前臺

復(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>


后臺

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

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

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《repeater 分列顯示以及布局的實(shí)例代碼》,本文關(guān)鍵詞  repeater,分列,顯示,以及,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時溝通與處理。本站內(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)民參考!
  • 推薦文章
    主站蜘蛛池模板: 四平市| 清水县| 武清区| 商河县| 梁平县| 隆安县| 呼图壁县| 正阳县| 昆山市| 林西县| 武平县| 岢岚县| 株洲市| 鹤壁市| 曲水县| 横峰县| 旺苍县| 建瓯市| 屯门区| 商水县| 汪清县| 密山市| 保山市| 乌兰县| 新丰县| 南城县| 濉溪县| 永康市| 镇安县| 汶上县| 芮城县| 崇文区| 清水河县| 库伦旗| 六枝特区| 体育| 赞皇县| 泰和县| 广河县| 太仆寺旗| 温州市|