Hi,

I generate a textbox server control dynamically through a subroutine when a user select an specific option from a dropdownlist. I do it thus:
Code:
Sub Activ(sender As Object, e As System.EventArgs)

   message1.Text = "Write your activity"
   
   Dim activ As Integer
   activ = which_Activ.SelectedItem.Value

   If (activ = 7) Then
   Dim myBox As TextBox = New TextBox()
   otherActiv.Controls.Add(myBox)

   End If

End Sub 

<html>
<body>
<form>
<asp:label ID="message1" runat="server" />
<asp:PlaceHolder ID="otherActiv" runat="server"/>
...
But the problem is after the user has generated the textbox placed in ‘PlaceHolder’, if some more postback occurs the textbox is erased, but not the message1. How can I avoid this so that the textbox generated persist like the other web form server controls? I want to use it as another form textbox. Is this the real purpose of the 'PlaceHolder' control?


(I will check the answer/s tomorrow, now in my country are 23:59 PM)
Thanks,
Cesar