Friday, March 11, 2011

Weird bug, how to handle dynamically loaded user control events not firing on first click

For every usercontrol,  need to set  ID property before adding. And don’t use Guid
Control ctl = this.LoadControl("usercontrol.ascx");
ctl.ID = "ctl" + i.ToString();
Panel1.Controls.Add(ctl);

No comments:

Post a Comment