private void LoadControl(IUserControlExtensionPoint extension) { var control = this.Page.LoadControl(extension.UserControlSrc); control.ID = Path.GetFileNameWithoutExtension(extension.UserControlSrc); this.Controls.Add(control); }
private MenuItemViewModel GetMenuItemFromExtensionPoint(IUserControlExtensionPoint userControlExtensionPoint) { return(new MenuItemViewModel { ID = Path.GetFileNameWithoutExtension(userControlExtensionPoint.UserControlSrc), Text = userControlExtensionPoint.Text, Source = userControlExtensionPoint.UserControlSrc, Order = userControlExtensionPoint.Order }); }
private void LoadControl(IUserControlExtensionPoint extension) { var control = Page.LoadControl(extension.UserControlSrc); control.ID = Path.GetFileNameWithoutExtension(extension.UserControlSrc); Controls.Add(control); }