Dropdown Button in EJ 1 ASP.NET MVC SplitButton
8 Aug 2017 / 1 minute to read
You can change the Split Button as Dropdown Button that consists of a single button that when clicked displays a drop-down list of mutually exclusive items. You can achieve this by using default functionality of Split Button with ButtonMode as ButtonMode.Dropdown. Initially the TargetID is a mandatory one.
The following steps explain how to change the Split Button as Dropdown Button.
-
In the VIEW page, add the following button elements to configure Button widget.
@*Add the code in the CSHTML page to configure and initialize the control*@ @Html.EJ().SplitButton("dropdownButton").Text("login").ShowRoundedCorner(true).Size(ButtonSize.Medium).ContentType(ContentType.TextOnly).TargetID("menu1").ButtonMode(ButtonMode.Dropdown) <ul id="menu1"> <li><span>User</span></li> <li><span>Guest</span></li> <li><span>Admin</span></li> </ul>
-
Execute the above code to render the following output.
Was this page helpful?
Yes
No
Thank you for your feedback!
Thank you for your feedback and comments. We will rectify this as soon as possible!
An unknown error has occurred. Please try again.
Help us improve this page