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:placeholder id="PlaceHolder1"
runat="server"></asp:placeholder>
<asp:label id="Label1" runat="server"></asp:label></p>
<p> </p>
</form>
Does this help?
Ken
Microsoft MVP [ASP.NET]
Toronto
"Mariame" <ma************@hotmail.com> wrote in message
news:eZ**************@TK2MSFTNGP14.phx.gbl...
Hi everyone
i have a textbox that is added dynamically in form load
i want an event to happen when the text change
how can i do it?
Thx in Adv