Button Type
The Button renders a <button type="submit">
element by default, as this is the default behavior of a button. This article explains how to change it.
You can control the type
attribute through the ButtonType
property of the component which can accept the following values:
-
Submit
- Renders atype="submit"
attribute. Can submit the form and trigger validation. The default value. -
Button
- Renders atype="button"
attribute. Does not invoke form validation and submission. -
Reset
- Renders atype="reset"
attribute. Can reset the current form.
<TelerikButton>Implicit SUBMIT</TelerikButton>
<TelerikButton ButtonType="@ButtonType.Submit">Explicit SUBMIT</TelerikButton>
<TelerikButton ButtonType="@ButtonType.Button">BUTTON</TelerikButton>
<TelerikButton ButtonType="@ButtonType.Reset">RESET</TelerikButton>