Hi Louis,
Thanks for contacting Syncfusion support.
We have checked with your query. To make use of ToggleButton’s API please refer the below code example.
Index.cshtml:
<input id="toggle" type="checkbox" />
<script>
$("#toggle").ejToggleButton({defaultText:"Play",activeText:"Pause"}); //control initialization
var btn = $("#toggle").data("ejToggleButton"); // instance creation for toggle button
btn.option("toggleState",false); // toggle state declaration
</script> |
You can define the ToggleState API for the Toggle Button in ASP.NET Core also. Please refer the below code.
Index.cshtml:
<ej-toggle-button id="check11" default-text="play" active-text="pause" toggle-state="false"/> |
Please refer the below API Documentation link to know more about toggleState API in the Toggle button.
Please refer the below UG documentation link to know more about Toggle button.
We have prepared the simple sample based on your requirement. Please get the sample from the below location.
Regards,
Berly B.C