前台
<asp:Repeater ID="Repeater1" runat="server" 
        onitemdatabound="Repeater1_ItemDataBound">
    <ItemTemplate>
    <table>
      <tr>
        <td>
    <img alt="0" src='<%# Eval("customer-img")%>' width="50" height="50" />
      
        </td>
        <td>
            <asp:Label ID="Label1" runat="server" Text="客户名:"></asp:Label>
            <asp:Label ID="Label4" runat="server" Text='<%# Eval("Title")%>'></asp:Label>
           <br />
            <asp:Label ID="Label2" runat="server" Text="客户简介:"></asp:Label><%# Eval("Content")%>
            <br />
            
     
    </table>
    </ItemTemplate>
    </asp:Repeater>
后台
 protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {              string lable=前台 ID="Label4"的text的值
           
            }
           
        }

解决方案 »

  1.   

    Label lbl=Repeater1.Items[0].FindControl("Label1") as Lable;
    Response.Write(lbl.Text);获取Repeater1第一个数据项(行)里的Label1的Text值。
      

  2.   

    Repeater1_ItemDataBound 事件里获得
    string s = (FindControl("Label4") as Label).Text;
      

  3.   

     
    foreach (RepeaterItem repera in this.Repeater1.Items)
                {
                    repera.FindControl("Label4") as Label).Text;
                }
      

  4.   

     if (!IsPostBack)
                {                bind();
                    Label lbl = Repeater1.Items[0].FindControl("Label1") as Lable;
                    string labl = lbl.Text;
                    bind2(labl);
               
                }
    我这样写得!
    出现
    错误 1 找不到类型或命名空间名称“Lable”(是否缺少 using 指令或程序集引用?) F:\job\job\Grayhound.cn.V3\Grayhound.CMS\customer.aspx.cs 24 73 Grayhound.CMS
      

  5.   

    我写给你的时候单词拼错了,应该是:
    Label lbl = Repeater1.Items[0].FindControl("Label1") as Label;