Reputation: 44312
I have an asp.net mvc form with a button
that is used for submitting the form. The problem is the button doesn't do anything. I'm using the Bootstrap framework for styling.
This doesn't work:
<button type=button class="btn btn-success btn-block">Send It</button>
But if I add this, it works:
<input type="submit" value="submit"/>
Is there a way to use the Bootstrap styled button for submitting the form?
Upvotes: 1
Views: 50
Reputation: 6796
A button
of type button
has no behaviour attached to it by default. To submit a form you should use the submit
type, instead.
<button type="submit" class="btn btn-success btn-block">Send It</button>
Upvotes: 1
Reputation: 24901
Just change yout button type to submit:
<button type="submit" class="btn btn-success btn-block">Send It</button>
Upvotes: 2