Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Page.LoadControl("~/controls/MyControl.ascx");
- Page currentPage = HttpContext.Current.Handler as Page;
- if (currentPage != null)
- {
- currentPage.Controls.Add(
- currentPage.LoadControl("~/controls/MyControl.ascx"));
- }
Add Comment
Please, Sign In to add comment