I'm adding alot of buttons at runtime to my form. When i push these buttons i want a confirm window to pop up and ask if i'm sure to delete this item.
How would i go by doing this. Every button is added dynamically so i expect that the confirmbuttonextender should also be added that way. Do i have to add a extender for each button or should i make one in the aspx file then change the targetID at runtime ?
UPDATE
Panel div = new Panel();
div.CssClass = "BulletDiv";
content.Controls.Add(div);
HyperLink picture = new HyperLink();
picture.ImageUrl = "~/Icons/Ny_mappa.png";
picture.NavigateUrl = "?navID=" + item.Nav_ID + "&ddlID=" + ddlID;
div.Controls.Add(picture);
div.Controls.Add(new LiteralControl("<br/>"));
HyperLink description = new HyperLink();
description.CssClass = "BulletDiv_Text";
description.Text = item.Nav_Name;
description.ID = item.Nav_ID.ToString();
description.NavigateUrl = "?navID=" + item.Nav_ID + "&ddlID=" + ddlID;
div.Controls.Add(description);
Button eyda = new Button();
eyda.Text = "Eyda";
eyda.CommandArgument = item.Nav_ID.ToString();
eyda.Command += new CommandEventHandler(eyda_Command);
div.Controls.Add(eyda);