jQWidgets Forums

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 7 years, 6 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    checkbox Posts
  • checkbox #97444

    madamipraim
    Participant

    Hi, I’m trying to use checkbox but I found strange behaviour. I’m using ASP NET Core 2. When I post the data, the field of corresponding value in the model has always value true.

    <jqx-checkbox theme="@ViewBag.Theme" id="IsWarrantyAppliedCheckbox" name="IsWarrantyApplied"></jqx-checkbox>

    public async Task<IActionResult> CheckDefects(int id, CheckDefectsViewModel model)
    {
        if (!model.IsWarrantyApplied)
            RedirectToAction("NoWarranty");
    
        RedirectToAction("WarrantyApplied"); 
    }

    In the example above the RedirectToAction(“NoWarranty”) is never called because model.IsWarrantyApplied is always true, regardless IsWarrantyAppliedCheckbox is checked or not.

    Any help please?
    Thanks

    checkbox #97447

    Peter Stoev
    Keymaster

    The checkbox’s checked property determines whether it is checked or not.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    https://www.jqwidgets.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.