你就控制textbox.enabled=true或false就可以了。

解决方案 »

  1.   

    Dim Txt As New TextBox()
            Txt.ID = "T"
            Me.FindControl("yourformid").Controls.Add(Txt)
      

  2.   

    TextBox yourbutton;
    yourbutton.ID="myID";
    yourbutton.Text="大家";
    使用父控件的add方法

    this.Datagrid1.Items.Cells[0].Add(yourbutton);
      

  3.   

    var box : TextBox = new TextBox();
    box.Text = "0";
    this.Controls.Add(box);
      

  4.   

    TextBox box = new TextBox();
    box.Text = "0";
    this.Controls.Add(box);
      

  5.   

    在需要的地方放一个Panel<asp:panel id=panel1 runat=server />
    后台编码:
    Dim myTextBox as New TextBox
    MyTextBox.ID = "MyTextBox1"
    MyTextBox.Text = ""
    Panel1.Controls.Add(myTextBox)'这里生成一个TextBox
      

  6.   

    janssenkm(正在吃饭,请不要打扰)  的方法,较好!