B
Bill
I'm trying to dynamically build several linkbuttons and
wire them up to a method called OnLinkClick . . .
For the life of me, I don't understand why the code below
isn't firing the event.
LinkButton lbBC = new LinkButton();
phBreadCrumb.Controls.Add(lbBC);
lbBC.Font.Size = 11;
lbBC.CssClass = "lnkBtnBreadCrumbProperties";
lbBC.Text = aryHyperlinks;
lbBC.ID = "lbBC" + i.ToString();
lbBC.CommandArgument = aryHyperlinks;
lbBC.Command += new
System.Web.UI.WebControls.CommandEventHandler
(OnLinkClick);
private void OnLinkClick(object O,
System.Web.UI.WebControls.CommandEventArgs E)
{
lblErrorMsg.Text = "Testing";
}
wire them up to a method called OnLinkClick . . .
For the life of me, I don't understand why the code below
isn't firing the event.
LinkButton lbBC = new LinkButton();
phBreadCrumb.Controls.Add(lbBC);
lbBC.Font.Size = 11;
lbBC.CssClass = "lnkBtnBreadCrumbProperties";
lbBC.Text = aryHyperlinks;
lbBC.ID = "lbBC" + i.ToString();
lbBC.CommandArgument = aryHyperlinks;
lbBC.Command += new
System.Web.UI.WebControls.CommandEventHandler
(OnLinkClick);
private void OnLinkClick(object O,
System.Web.UI.WebControls.CommandEventArgs E)
{
lblErrorMsg.Text = "Testing";
}