ButtonsAndLinkExtensions.SubmitButton Method (HtmlHelper, String, String, IDictionary<String, Object>)
Creates a submit button for your form.
Namespace: Microsoft.Web.Mvc
Assembly: Microsoft.Web.Mvc (in Microsoft.Web.Mvc.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function SubmitButton ( _
helper As HtmlHelper, _
name As String, _
buttonText As String, _
htmlAttributes As IDictionary(Of String, Object) _
) As MvcHtmlString
'Usage
Dim helper As HtmlHelper
Dim name As String
Dim buttonText As String
Dim htmlAttributes As IDictionary(Of String, Object)
Dim returnValue As MvcHtmlString
returnValue = helper.SubmitButton(name, _
buttonText, htmlAttributes)
public static MvcHtmlString SubmitButton(
this HtmlHelper helper,
string name,
string buttonText,
IDictionary<string, Object> htmlAttributes
)
[ExtensionAttribute]
public:
static MvcHtmlString^ SubmitButton(
HtmlHelper^ helper,
String^ name,
String^ buttonText,
IDictionary<String^, Object^>^ htmlAttributes
)
static member SubmitButton :
helper:HtmlHelper *
name:string *
buttonText:string *
htmlAttributes:IDictionary<string, Object> -> MvcHtmlString
public static function SubmitButton(
helper : HtmlHelper,
name : String,
buttonText : String,
htmlAttributes : IDictionary<String, Object>
) : MvcHtmlString
Parameters
- helper
Type: System.Web.Mvc.HtmlHelper
The helper which we extend.
- name
Type: System.String
Name of the button.
- buttonText
Type: System.String
The text for the button face.
- htmlAttributes
Type: System.Collections.Generic.IDictionary<String, Object>
Dictionary of HTML settings.
Return Value
Type: System.Web.Mvc.MvcHtmlString
A MvcHtmlString that represents the submit button.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type HtmlHelper. When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936(v=vs.118) or https://msdn.microsoft.com/en-us/library/bb383977(v=vs.118).