/// <summary> /// Constructs a link to a given action control. /// </summary> /// <param name="action">The action.</param> /// <returns></returns> public string GetLink(SharePointForumControls action) { return(string.Format("{0}?control={1}", BasePath, action.ToString())); }
private BaseForumControl CreateDynamicForumControl(SharePointForumControls childControl) { BaseForumControl control = null; try { string controlTypeName = string.Format("{0}.{1}", ForumConstants.Control_Namespace, childControl.ToString()); Type controlType = Type.GetType(controlTypeName); control = Activator.CreateInstance(controlType) as BaseForumControl; control.WebPartParent = this; } catch(ArgumentNullException nullEx) { AddError(nullEx); } return control; }
/// <summary> /// Constructs a link to a given action control. /// </summary> /// <param name="action">The action.</param> /// <returns></returns> public string GetLink(SharePointForumControls action) { return string.Format("{0}?control={1}", BasePath, action.ToString()); }
private BaseForumControl CreateDynamicForumControl(SharePointForumControls childControl) { BaseForumControl control = null; try { string controlTypeName = string.Format("{0}.{1}", ForumConstants.Control_Namespace, childControl.ToString()); Type controlType = Type.GetType(controlTypeName); control = Activator.CreateInstance(controlType) as BaseForumControl; control.WebPartParent = this; } catch (ArgumentNullException nullEx) { AddError(nullEx); } return(control); }