楼主这样试试:
  ((TextBox)Repeater1.FindControl("TextBox1")).Text = "值";

解决方案 »

  1.   

    ((TextBox)Repeater1.items[i].FindControl("TextBox1")).Text = "值";
    items[i]是第几行
      

  2.   

    TextBox txt = (TextBox)Repeater1.FindControl("txt");
     txt.Text="value";只要先 TextBox txt = (TextBox)Repeater1.FindControl("txt");
    剩下的就跟正常TextBox的用法没区别了
      

  3.   

    ((TextBox)Repeater1.FindControl("TextBox1")).Text = "值";
    首先你是在哪个事件要用到,如果是repeater外,则可以考虑使用上面这个不过要设置其id为对应findcontrol里面的,如果在内部了,先说是哪个事件
      

  4.   

    外部page_Load 和 内部的ItemCommand事件里都要使用  我在page_Load 里
    ((TextBox)Repeater1.FindControl("TextBox1")).Text = "值";ItemCommand事件内部
    TextBox txt = new TextBox();
    txt = (TextBox)e.Item.FindControl("TextBoxIndex");
    string str = txt.Text;
    txt.Text="safas";
    可以取到值和赋值
    但是在外面怎么就不行  
      

  5.   

    原来你是动态加入控件,那么在pageload里面当然不行了,你得像itemcommand样的,先new,然后在findcontrol
      

  6.   

    是在pageload里给文本框赋值  那到底应该怎样做呢  呵呵  我还是有点不明白
      

  7.   

    上面那个可以是只能获取到除了页头和页脚中间显示数据那段里面的控件 要想获取到 页脚上的空间好像要在repeater1.controls里面去获取
      

  8.   

    如果你用的是Web服务器控件,在页脚的控件可以通过如下方式设置其文本(页脚只有一个控件)((TextBox)Repeater1.Controls[Repeater1.Controls.Count - 1]).Text = "abc";
      

  9.   

    只能在ItemCommand事件里使用
    (TextBox)e.Item.FindControl( "txtName").Text = "";
    才能找到textbox控件
      

  10.   

    在數據綁定控件中可以設置其值 。        protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e)
            {
                if (e.Item.ItemType == ListItemType.Footer)
                {
                   string set=(e.Item.FindControl("lb_text") as Label).Text;
                }
            }