i have the following Problem:
I want to know if it is possible to modify default html helper methods, e.g. the Html.BeginForm() method.
I know that i can write a custom helper method where i can add some stuff, but some of them have alot of overloaded functions.
then only thing i would need is, that you can add some custom html string "after" the element was rendered
e.g.:
@using(Html.BeginForm("setDate", "DateController", new { DateId = Model.Date.Identifier }, FormMethod.Post, new { id = "setDateForm" })) {
@* some input here... *@
}
and after the
<form></form>
i would like to render a validation script, or something else, lets say jQuery validator:
<script>$('#setDateForm').validate();</script>
since i dont want to do that over and over again (maybe i could forget it once..) it would be nice to modify the default Html helper.
If it is not possible i just might have to write my own BeginForm or a wrapper for the EndForm helper :/