public static MvcHtmlString InputText(string inputName, string title = "", string placeholder = "") { string inputID = "input-" + EncryptionMD5.ToMd5(inputName); TagBuilder input = new TagBuilder("input"); input.MergeAttribute("type", "text"); input.MergeAttribute("name", inputName); input.MergeAttribute("id", inputID); input.MergeAttribute("class", "form-control"); if (placeholder.Length > 0) { input.MergeAttribute("placeholder", placeholder); } return(InputGroup(inputID, title, input)); }
public static MvcHtmlString InputTextarea(string inputName, string title = "", string placeholder = "", string value = "", Boolean request = false, string help = "") { string inputID = "input-" + EncryptionMD5.ToMd5(inputName); TagBuilder input = new TagBuilder("textarea"); input.MergeAttribute("name", inputName); input.MergeAttribute("id", inputID); input.MergeAttribute("rows", "3"); input.MergeAttribute("class", "form-control"); if (placeholder.Length > 0) { input.MergeAttribute("placeholder", placeholder); } input.InnerHtml = value; return(InputGroup(inputID, title, input, request, help)); }