Write following code.
Control c = (Control)Page.LoadControl("~/usercontrol/MyUserControl.ascx");
Instead of adding this user control into the Form you can add into Panel too so that you can position it at your desired location. In that case you need to delcare a panel in the .aspx page and write following code.
Asked In: Many Interviews |