I’m building an application using ASP.net MVC 3 and I’m wondering if anyone knows a great library
to fill the gaps of the build-in html form field helpers?
E.g. creating a Textbox is easy:
@Html.EditorFor(model => model.TextboxTest)
But for creating a Dropdown list I have to write:
@Html.DropDownListFor(model => model.DropdownTest, Model.DropdownTestData)
And it should be written like
@Html.EditorFor(model => model.DropdownTest)
where DropdownTest is a SelectList.
There is an example solution for this which can be found here.
The same is a list of radiobuttons: It’s not included in MVC (at the moment). There is another good solution which can be found here and with this solution I would be able to write
@Html.RadioButtonListFor(model=>model.Item,Model.ItemList)
So there are solutions available but not structured in a library (respectively I didn’t found one) and I don’t want to copy and paste this solutions together piece by piece (because I cannot update it easily with NuGet e.g.), a whole library would be better but I could not find any.
Please help 🙂
Take those solutions from the various locations if you want to use them and put them into your own library. And if you want to use NuGet to manage your libraries, you can create your own NuGet repository to hold that library. You can have your NuGet package dependent on the MVC libraries, so all you ever need to pull down is your package and it will include MVC3.