Check Uncheck CheckBox on Button Click with Button Text in ASP.Net MVC

Last Reply 4 months ago By chetan

Posted 4 months ago

I have button: Turn Email On and checkbox(which is unchecked) on side of that button.

When i click Turn email on button,it should call action method of controller where i have to write SP to update the email table.
like update tablename set isemailon_off=1 where isemailon_off=0.

Email table have one field: isemailon_off(int type).i inserted value 0 into it.

So, Turn email on button's text will become turn email off and checkbox becomes checked.

How to achieve this using Mvc?
Any help will be highly appreciated.

Turn Email ON (button) Checkbox(unchecked)
                                ||
                           BECOMES

Turn Email Off (button) Chekbox(checked)

You are viewing reply posted by: dharmendr 4 months ago.