ButtonBuilder.Button Method (String, String, HtmlButtonType, String, IDictionary<String, Object>)
A Simple button you can use with JavaScript.
Namespace: Microsoft.Web.Mvc
Assembly: Microsoft.Web.Mvc (in Microsoft.Web.Mvc.dll)
Syntax
public static TagBuilder Button(
string name,
string buttonText,
HtmlButtonType type,
string onClickMethod,
IDictionary<string, object> htmlAttributes
)
public:
static TagBuilder^ Button(
String^ name,
String^ buttonText,
HtmlButtonType type,
String^ onClickMethod,
IDictionary<String^, Object^>^ htmlAttributes
)
static member Button :
name:string *
buttonText:string *
type:HtmlButtonType *
onClickMethod:string *
htmlAttributes:IDictionary<string, Object> -> TagBuilder
Public Shared Function Button (
name As String,
buttonText As String,
type As HtmlButtonType,
onClickMethod As String,
htmlAttributes As IDictionary(Of String, Object)
) As TagBuilder
Parameters
name
Type: System.StringThe name of the button.
buttonText
Type: System.StringThe text for the button face.
type
Type: Microsoft.Web.Mvc.HtmlButtonTypeThe type of the button.
onClickMethod
Type: System.StringThe method or script routine to call when the button is clicked.
htmlAttributes
Type: System.Collections.Generic.IDictionary<String, Object>Dictionary of HTML settings.
Return Value
Type: System.Web.Mvc.TagBuilder
A TagBuilder that represents the button.
See Also
ButtonBuilder Class
Microsoft.Web.Mvc Namespace
Return to top