I am creating rows of buttons on the fly with a button and a textbox allready on the webpage, then it seems that the event is allready catch by this button, and new created buttons events are lost<BR><BR><BR>do you know how to avoid that ??<BR><BR>thank you again<BR><BR>----------------------------------------<BR><BR> Protected WithEvents frm As HtmlForm<BR> Protected WithEvents t_nb As TextBox<BR> Protected WithEvents btnCree As Button<BR><BR>Protected WithEvents nBR As New ButtonsRows()<BR><BR> Private Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load<BR><BR> End Sub<BR><BR> Public Sub btnCree_command(ByVal sender As System.Object, ByVal e As CommandEventArgs) Handles btnCree.Command<BR><BR> <BR> frm.Controls.Add(nBR.DisplayButtons(CInt(t_nb.Text )))<BR> <BR> End Sub<BR><BR><BR>----------------------------------------------<BR><BR>Public Class ButtonsRows<BR><BR> Public Event SimpleAction(ByVal sender As Object, ByVal ev As EventArgs)<BR><BR> Protected Overridable Sub OnSimpleAction(ByVal e As EventArgs)<BR> RaiseEvent SimpleAction(Me, e)<BR> End Sub<BR><BR> Public Sub SimpleAction_command(ByVal sender As Object, ByVal e As CommandEventArgs)<BR><BR> HttpContext.Current.Response.Redirect(myFile + "?cat=" + e.CommandName)<BR><BR> End Sub<BR><BR> Public Function DisplayButtons(ByVal n As Int32) As HtmlTable<BR><BR> Dim t As New HtmlTable()<BR><BR> t.ID = "Boutons"<BR> t.Attributes.Add("class", "Panier")<BR><BR> Dim r As HtmlTableRow<BR> Dim cbtn, ctxt As HtmlTableCell<BR><BR> Dim i As Int32<BR> Dim nb As Button<BR> Dim nt As TextBox<BR><BR> For i = 1 To n<BR><BR> r = New HtmlTableRow()<BR><BR> nb = New Button()<BR><BR> With nb<BR> .ID = "btn_" + i.ToString<BR> .Text = "OK " + i.ToString<BR> .CommandName = i.ToString<BR> End With<BR><BR> AddHandler nb.Command, AddressOf SimpleAction_command<BR><BR> cbtn = New HtmlTableCell()<BR> cbtn.Attributes.Add("class", "")<BR> cbtn.Controls.Add(nb)<BR><BR> r.Cells.Add(cbtn)<BR><BR> t.Rows.Add(r)<BR> Next<BR><BR> Return t<BR><BR> End Function<BR><BR>End Class