.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
Post a Comment