Class Button
Represents the Button UI element.
Inheritance
System.Object
Button
Implements
System.Web.UI.INamingContainer
System.Web.UI.IPostBackEventHandler
System.Web.UI.IPostBackDataHandler
System.Web.UI.IUrlResolutionService
Assembly: Syncfusion.EJ.Web.dll
public class Button : CommonControl, INamingContainer, IPostBackEventHandler, IPostBackDataHandler, IUrlResolutionService
Constructors
Declaration
Properties
Gets or sets a value indicating this event gets fired when button is clicked.
Declaration
public string ClientSideOnClick { get; set; }
Property Value
| Type |
Description |
| System.String |
|
Gets or sets a value indicating this event gets fired when button is created.
Declaration
public string ClientSideOnCreate { get; set; }
Property Value
| Type |
Description |
| System.String |
|
Gets or sets a value indicating this event gets fired when the button is destroyed.
Declaration
public string ClientSideOnDestroy { get; set; }
Property Value
| Type |
Description |
| System.String |
|
ContentType
Gets or sets the content type of the button. Button can have image only, text only, image text image, text and image or image both as content type.
Declaration
public ContentType ContentType { get; set; }
Property Value
Gets or sets the root CSS class to button for theme customization.
Declaration
public string CssClass { get; set; }
Property Value
| Type |
Description |
| System.String |
|
Gets or sets a value indicating whether the control can respond to user interaction.
Declaration
public bool Enabled { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
Gets or sets a value indicating whether control's elements supports to align in right to left direction.
Declaration
public bool EnableRTL { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
Gets or sets the height of the button.
Declaration
public string Height { get; set; }
Property Value
| Type |
Description |
| System.String |
|
Declaration
public IDictionary<string, object> HtmlAttributes { get; set; }
Property Value
| Type |
Description |
| System.Collections.Generic.IDictionary<System.String, System.Object> |
|
Gets or sets a value indicating whether image position is left or right. This property is applicable for the content type 'text and image' only.
Declaration
public ImagePosition ImagePosition { get; set; }
Property Value
Gets or sets the button model object of the button properties.
Declaration
public ButtonProperties Model { get; set; }
Property Value
Gets or sets the primary icon for button. This is applicable for the content types image only, image text image, text and image and image both.
Declaration
public string PrefixIcon { get; set; }
Property Value
| Type |
Description |
| System.String |
|
Gets or sets a value indicating whether button can acts as repeat button. Repeat button raises its ‘click’ event repeatedly from the time it is pressed until it is released.
Declaration
public bool RepeatButton { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
Gets or sets a value indicating whether button with rounded corners or not.
Declaration
public bool ShowRoundedCorner { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
Gets or sets the size of the button. Size can be normal, mini, small, medium or large.
Declaration
public ButtonSize Size { get; set; }
Property Value
Gets or sets the secondary icon for button. This is applicable for the content types imagetextimage and imageboth.
Declaration
public string SuffixIcon { get; set; }
Property Value
| Type |
Description |
| System.String |
|
Text
Gets or sets the text associated with button.
Declaration
public string Text { get; set; }
Property Value
| Type |
Description |
| System.String |
|
Gets or sets the time interval between two consecutive ‘click’ event on the button. This applicable for button in 'repeat button' mode only.
Declaration
public string TimeInterval { get; set; }
Property Value
| Type |
Description |
| System.String |
|
Gets or sets a value indicating whether the button is a submit, reset or normal button.
Declaration
public ButtonType Type { get; set; }
Property Value
Gets or sets the width of the button.
Declaration
public string Width { get; set; }
Property Value
| Type |
Description |
| System.String |
|
Methods
Specifies the dependent scripts.
Declaration
public List<string> DependentScripts()
Returns
| Type |
Description |
| System.Collections.Generic.List<System.String> |
|
Specifies the the dependent files.
Declaration
public override List<string> GetDependentFiles()
Returns
| Type |
Description |
| System.Collections.Generic.List<System.String> |
|
Overrides
Declaration
protected override void LoadViewState(object state)
Parameters
| Type |
Name |
Description |
| System.Object |
state |
|
Overrides
Declaration
protected override void OnPreRender(EventArgs e)
Parameters
| Type |
Name |
Description |
| System.EventArgs |
e |
|
PostBackEventHandler(String, Dictionary<String, Object>)
Specifies the handler for server side events.
Declaration
public override void PostBackEventHandler(string EventName, Dictionary<string, object> args)
Parameters
| Type |
Name |
Description |
| System.String |
EventName |
|
| System.Collections.Generic.Dictionary<System.String, System.Object> |
args |
|
Overrides
Renders the button instance.
Declaration
Returns
| Type |
Description |
| System.String |
|
Render(HtmlTextWriter)
Declaration
protected override void Render(HtmlTextWriter writer)
Parameters
| Type |
Name |
Description |
| System.Web.UI.HtmlTextWriter |
writer |
|
Overrides
Updates the server model with client model.
Declaration
public override void UpdateServerModel(Dictionary<string, object> ClientModel)
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.Dictionary<System.String, System.Object> |
ClientModel |
|
Overrides
Events
Represents the button click event handler.
Declaration
public event Button.ButtonEventHandler Click
Event Type
Implements
System.Web.UI.INamingContainer
System.Web.UI.IPostBackEventHandler
System.Web.UI.IPostBackDataHandler
System.Web.UI.IUrlResolutionService