Skip to main content

BootstrapButton Class

#Declaration

TypeScript
class BootstrapButton extends Control

#Remarks

IMPORTANT

Bootstrap Controls for ASP.NET Core are in maintenance mode. We don’t add new controls or develop new functionality for this product line. Our recommendation is to use the ASP.NET Core Controls suite.

#Inheritance

Control
BootstrapButton

#Methods

#doClick Method

Simulates a mouse click action on the button control.

#Declaration

TypeScript
doClick(): void

#focus Method

Sets input focus to the button.

#Declaration

TypeScript
focus(): void

#getBadgeIconCssClass Method

#Declaration

TypeScript
getBadgeIconCssClass(): string

#Returns

Type
string

#getBadgeText Method

#Declaration

TypeScript
getBadgeText(): string

#Returns

Type
string

#getChecked Method

Returns a value indicating whether the button is checked.

#Declaration

TypeScript
getChecked(): boolean

#Returns

Type
boolean

#getEnabled Method

Returns a value indicating whether the button is enabled.

#Declaration

TypeScript
getEnabled(): boolean

#Returns

Type
boolean

#getImageUrl Method

#Declaration

TypeScript
getImageUrl(): string

#Returns

Type
string

#getText Method

Returns the text displayed within the button.

#Declaration

TypeScript
getText(): string

#Returns

Type
string

#off<K> Method

#Declaration

TypeScript
off<K extends keyof BootstrapButtonEventMap>(
    eventName?: K,
    callback?: (this: BootstrapButton,
    args?: BootstrapButtonEventMap[K]) => void
): this

#Parameters

Name Type
eventName K
callback (this: BootstrapButton, args?: BootstrapButtonEventMap[K]) => void

#Type Parameters

Name Type
K keyof

#Returns

Type
this

#on<K>(eventName, callback) Method

#Declaration

TypeScript
on<K extends keyof BootstrapButtonEventMap>(
    eventName: K,
    callback: (this: BootstrapButton,
    args?: BootstrapButtonEventMap[K]) => void
): this

#Parameters

Name Type
eventName K
callback (this: BootstrapButton, args?: BootstrapButtonEventMap[K]) => void

#Type Parameters

Name Type
K keyof

#Returns

Type
this

#once<K>(eventName, callback) Method

#Declaration

TypeScript
once<K extends keyof BootstrapButtonEventMap>(
    eventName: K,
    callback: (this: BootstrapButton,
    args?: BootstrapButtonEventMap[K]) => void
): this

#Parameters

Name Type
eventName K
callback (this: BootstrapButton, args?: BootstrapButtonEventMap[K]) => void

#Type Parameters

Name Type
K keyof

#Returns

Type
this

#setBadgeIconCssClass(cssClass) Method

#Declaration

TypeScript
setBadgeIconCssClass(
    cssClass: string
): void

#Parameters

Name Type
cssClass string

#setBadgeText(text) Method

#Declaration

TypeScript
setBadgeText(
    text: string
): void

#Parameters

Name Type
text string

#setChecked(value) Method

Sets a value that specifies the button’s checked status.

#Declaration

TypeScript
setChecked(
    value: boolean
): void

#Parameters

Name Type
value boolean

#setEnabled(value) Method

Sets a value specifying whether the button is enabled.

#Declaration

TypeScript
setEnabled(
    value: boolean
): void

#Parameters

Name Type
value boolean

#setImageUrl(value) Method

#Declaration

TypeScript
setImageUrl(
    value: string
): void

#Parameters

Name Type
value string

#setText(value) Method

Sets the text to be displayed within the button.

#Declaration

TypeScript
setText(
    value: string
): void

#Parameters

Name Type
value string