I am programatically making some LinkButtons, and they worked fine for a while, but now the events aren't firing and I can't figure out why?
This is what makes the button:
protected void MakeUploadButton(attachment a, PlaceHolder ph)
{
LinkButton lb = new LinkButton()
{
Text = "Upload New " + a.attachment_type.type_name,
CssClass = "button right",
ID = "lb" + a.attachment_type.file_tag,
CommandArgument = a.attachment_type_id.ToString(),
CommandName = a.attachment_type.type_name,
CausesValidation = false
};
lb.Click += new EventHandler(showModalPopup);
lb.DataBind();
ph.Controls.Add(lb);
}
ShowModalPopup exists and all, but when I run it in Debug, nothing inside of it ever fires... for some reason, it is not getting called. Any ideas?