Render buttons as "input type=button"

By Igor Kirtak on 16 Feb 2015
If you use button with Ajax call, or navigate - than it's not really submit, it's a button. But, as I understand, all the buttons are rendered as "input type=submit".  Normally, there should be only one submit on form. This makes also problem with default button (the one you expect to be activated on Enter press) - in reality you will get the first "submit" activated, which may be not the one you want. Or, vice versa - if you DON"T want any button to be activated by Enter - but if you have at least one button, it will be activated, because it's "submit".

It would be good if there is possibility to render buttons as "input type=button". I would even suggest that "button" should be the default behaviour, unless: (a) On Click method = Submit, or (b) Is Default = Yes, or (c) you set it as "submit" explicitly (not sure if there is really a need for such option) - only under these conditions the button will be rendered as "submit".
This idea has no comments yet. Be the first to comment!