protected void NewTache_Click1(object sender, ImageClickEventArgs e) { Session["TableNonPrevu"] = Int32.Parse(Session["TableNonPrevu"].ToString()) + Int32.Parse(TextBox43.Text); for (Int32 i = 0; i < Int32.Parse(Session["TableNonPrevu"].ToString()); i++) { Int32 currentrow=i + Table2.Rows.Count; TableRow newrow = new TableRow(); newrow.Cells.Add(new TableCell()); newrow.Cells.Add(new TableCell()); newrow.Cells.Add(new TableCell()); newrow.Cells.Add(new TableCell()); TextBox tache = new TextBox(); TextBox charge = new TextBox(); TextBox description = new TextBox(); ListBox responsable = new ListBox(); LinkButton AN = new LinkButton(); UpdatePanel ANU = new UpdatePanel(); tache.Width = 347; responsable.Width = 74; responsable.Height = 26; responsable.ID = "re" + currentrow; AN.ID = "AN" + currentrow; AN.Text = " +"; AN.OnClientClick = "Ressource()"; AN.Click += new EventHandler(AN_Click); ANU.ID = "AN"+ currentrow +"U"; AN.CommandArgument = "2:" + currentrow + ":" + responsable.ID +":"+ ANU.ID; charge.Width = 75; description.Width = 347; ANU.ContentTemplateContainer.Controls.Add(responsable); ANU.ContentTemplateContainer.Controls.Add(AN); ANU.UpdateMode = UpdatePanelUpdateMode.Conditional; newrow.Cells[0].Controls.Add(tache); newrow.Cells[1].Controls.Add(ANU); newrow.Cells[1].HorizontalAlign = HorizontalAlign.Left ; newrow.Cells[2].Controls.Add(charge); newrow.Cells[3].Controls.Add(description); Table2.Rows.Add(newrow); } NonPrevue.Update(); }
If the linkbutton has PostBackUrl set then the Click event of that linkbutton will not fire.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)