Getting Started
10 Jul 20171 minute to read
This section explains briefly about how to create a ToggleButton in your ASP.NET MVC application.
Create your first Toggle Button in MVC
The Toggle Button control displays both text and images. The text displayed on the Toggle Button is contained in the Text property. The Toggle Button control display images using the SpriteCssClass and ImagePosition properties. The Toggle Buttons has theme support also.
The following screenshot illustrates a Toggle Button control.
Create a Toggle Button
Essential Studio ASP.NET MVC Toggle Button control has a built-in feature to customize the size, text and images of button.
- Create an MVC Project and add required assemblies, scripts, and styles to it. Refer MVC-Getting Started Documentation.
-
Add the following code example to the corresponding view page to render the Toggle Button.
@Html.EJ().ToggleButton("button").Size(ButtonSize.Mini).ShowRoundedCorner(true).DefaultText("Play")
- Output of the above steps.