.net - There's no @Html.Button ! -


this weird. see references out there @html.button() when type intellisense doesn't find such helper... there's dropdownlist, hidden, editors, et cetera, no button!

what's that?

public static class htmlbuttonextension  {    public static mvchtmlstring button(this htmlhelper helper,                                       string innerhtml,                                       object htmlattributes)    {      return button(helper, innerhtml,                   htmlhelper.anonymousobjecttohtmlattributes(htmlattributes)     );    }    public static mvchtmlstring button(this htmlhelper helper,                                       string innerhtml,                                      idictionary<string, object> htmlattributes)   {       var builder = new tagbuilder("button");       builder.innerhtml = innerhtml;       builder.mergeattributes(htmlattributes);       return mvchtmlstring.create(builder.tostring());   } } 

Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -