Example #1
0
 /// <summary>
 /// Generates the primary/root tag (which will contain child tags if required)
 /// </summary>
 /// <param name="tagName">Name of the tag.</param>
 /// <returns>Tag builder for the tag</returns>
 /// <remarks>Adds all HTML attributes which has been specified in the Context, the name and the ID. Will
 /// also add any validation state members.</remarks>
 protected NestedTagBuilder CreatePrimaryTag(string tagName)
 {
     var tagBuilder = new NestedTagBuilder(tagName);
     tagBuilder.MergeAttributes(Context.HtmlAttributes);
     tagBuilder.MergeAttribute("name", Context.FullName, true);
     tagBuilder.GenerateId(Context.FullName);
     SetValidationState(tagBuilder, Context.FullName);
     return tagBuilder;
 }
Example #2
0
        /// <summary>
        /// Generates the primary/root tag (which will contain child tags if required)
        /// </summary>
        /// <param name="tagName">Name of the tag.</param>
        /// <returns>Tag builder for the tag</returns>
        /// <remarks>Adds all HTML attributes which has been specified in the Context, the name and the ID. Will
        /// also add any validation state members.</remarks>
        protected NestedTagBuilder CreatePrimaryTag(string tagName)
        {
            var tagBuilder = new NestedTagBuilder(tagName);

            tagBuilder.MergeAttributes(Context.HtmlAttributes);
            tagBuilder.MergeAttribute("name", Context.FullName, true);
            tagBuilder.GenerateId(Context.FullName);
            SetValidationState(tagBuilder, Context.FullName);
            return(tagBuilder);
        }