cesark
Programmer
- Dec 20, 2003
- 621
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:
But the problem is after the user has generated the textbox placed in ‘PlaceHolder’, if some more postback occurs the texbox is erased. How can I avoid this so that the textbox generated persist like the other web form server controls?
Thanks,
Cesar
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)
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:PlaceHolder ID="otherActiv" runat="server"/>
...
Thanks,
Cesar