We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Problem with checkbox in Mvc 5

Hi Guys,

I am having an issue with a simple check box used in a MVC 5 form I set value to example yes when looking in database (entity framework code first) if check box is selected value in database is yes if check box is not selected value is still yes this is driving me nuts.

I am using ion=13.1500.0.21 and Syncfusion.EJ, Version=13.1450.0.21

Any help would be appreaciated

Edmund Herbert

4 Replies

SS Saranya Sivakumar Syncfusion Team July 20, 2015 08:34 AM UTC

Hi Edmund,

Thanks for using Syncfusion products.

We have analyzed the reported issue (Checkbox always posts “Yes” to the value even if it is unchecked.) with our sample in the Version 13.1.0.21 and we are unable to reproduce the issue in our end. We have prepared the sample based on your requirement and the same can be downloaded from the following location.

http://www.syncfusion.com/uploads/user/forum/119660/ze/CheckboxValueYes121-1000451495

In this sample the value “Yes” will get posted only if the check box has been checked. Kindly check with the sample and let us know if you would require any further assistance.

Regards,

Saranya.S



EH Edmund Herbert July 20, 2015 09:28 AM UTC

Hi Saranya

The problem that I am having is when you post form to controller I have attached images in image 1 the workhis.internet field is always true even if checkbox is nor checked , you example works mine does not see image 2 and 3

Regards

Edmund

Attachment: Check_Problem_2015_f7dafa1f.rar


EH Edmund Herbert July 20, 2015 10:49 AM UTC

Hi Guys,

Problem resolved if  <add key="UnobtrusiveJavaScriptEnabled" value="false" /> is set to true, problem with check box is visible
so don't set it to true

Thanks

Edmund


SS Saranya Sivakumar Syncfusion Team July 21, 2015 09:13 AM UTC

Hi Edmund,

We were able to reproduce the problem (Checkbox value gets posted even if it is unchecked in unobtrusive enabled state) and we have logged a report regarding this. A support incident to track the status of this defect has been created under your account. Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

Please let me know if you have any questions.

Regards,

Saranya.S


Loader.
Up arrow icon