I have a form like this
@using (Html.BeginForm("action", "controller", FormMethod.Post, new { id = "_identity" }))
{
// element here
<input class="buttonblue" type="submit" value="Save" id="Submit1" />
}
It is validate by Model
.
It's working fine. And now I want to detect if this request is reached at controller action after validate.
Actually I want to disable submit button
when request is reached at controller.
I have tried following. But I think this is not correct.
$('#_identity').submit(function () {
$("#Submit1").val("Saving...");
$("#Submit1").attr('disabled', 'disabled');
});
This is called before request reached at controller and before validate.
I want simple thing if form is validated and request reached at controller then user can't hit submit button again.