public static HtmlContainerControl CreateHeading( int level, string id, string className, object content) { if ((level < 1) || (level > 6)) { throw new VoteException("Heading level must be 1 through 6"); } var heading = new HtmlGenericControl("h" + level.ToString(CultureInfo.InvariantCulture)); if (id != null) { heading.ID = id; } heading.AddCssClasses(className); InsertContent(heading, content); return(heading); }