ButtonsAndLinkExtensions.Button Method (HtmlHelper, String, String, HtmlButtonType)

A Simple button you can use with JavaScript.

Namespace:  Microsoft.Web.Mvc
Assembly:  Microsoft.Web.Mvc (in Microsoft.Web.Mvc.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function Button ( _
    helper As HtmlHelper, _
    name As String, _
    buttonText As String, _
    buttonType As HtmlButtonType _
) As MvcHtmlString
'Usage
Dim helper As HtmlHelper 
Dim name As String 
Dim buttonText As String 
Dim buttonType As HtmlButtonType 
Dim returnValue As MvcHtmlString 

returnValue = helper.Button(name, _
    buttonText, buttonType)
public static MvcHtmlString Button(
    this HtmlHelper helper,
    string name,
    string buttonText,
    HtmlButtonType buttonType
)
[ExtensionAttribute]
public:
static MvcHtmlString^ Button(
    HtmlHelper^ helper, 
    String^ name, 
    String^ buttonText, 
    HtmlButtonType buttonType
)
static member Button : 
        helper:HtmlHelper * 
        name:string * 
        buttonText:string * 
        buttonType:HtmlButtonType -> MvcHtmlString
public static function Button(
    helper : HtmlHelper, 
    name : String, 
    buttonText : String, 
    buttonType : HtmlButtonType
) : MvcHtmlString

Parameters

Return Value

Type: System.Web.Mvc.MvcHtmlString
A MvcHtmlString that represents the 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).

See Also

Reference

ButtonsAndLinkExtensions Class

Button Overload

Microsoft.Web.Mvc Namespace