Hi Mariame,
Are you adding your own handler? Here's some code to show how it is done.
Note that getting the TextChanged event to fire can be tricky... you may
need to hit the Enter key in the texbox after changing the text.
Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim txtbx As New TextBox
txtbx.ID = "Mytextbox"
txtbx.Text = "Change this text and hit Enter"
txtbx.EnableViewState = True
PlaceHolder1.Controls.Add(txtbx)
AddHandler txtbx.TextChanged, AddressOf TextBox_TextChanged
End Sub
Private Sub TextBox_TextChanged _
(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim txtbx As TextBox
txtbx = sender
Label1.Text = txtbx.ID & " at " & Now.ToLongTimeString
End Sub
<form id="Form1" method="post" runat="server">
<p>
<asp
laceholder id="PlaceHolder1"
runat="server"></asp
laceholder>
<asp:label id="Label1" runat="server"></asp:label></p>
<p> </p>
</form>
Does this help?
Ken
Microsoft MVP [ASP.NET]
Toronto