Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9182453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:33:48+00:00 2026-06-17T18:33:48+00:00

Problem: Check box value display null in controller.cs. but it is working perfectly according

  • 0

Problem: Check box value display null in controller.cs. but it is working perfectly according to selection of row from jqgrid. But when I select any row and update all the field it will pass to the controller with modified value but only IsEnabled field comes null.

I have Database Field called IsEnabled which has Bit data type.

I have written following code in .cshtml

<input type="checkbox" value='Yes' offval='No' name="IsEnabled" />

I am using following code to bind check box value as per in database

grid.jqGrid('GridToForm', gsr, "#order");

I have save button. When I click on save following code will execute

$("#btnSave").click(function () {
                var data = JSON.stringify($('#order').serializeObject());
                var href = '@Url.Action("SaveData", "Users")';
                var ajaxResponse = $.ajax({
                    type: "post",
                    url: href,
                    dataType: 'json',
                    data: data,
                    contentType: "application/json; charset=utf-8",
                    success: function (result) {
                        if (result.Success == true) {
                            alert("Success");
                        }
                        else {
                            alert("Error: " + result.Message);
                        }
                    }
                });

Following code written in Controller.cs

(in FormValue it will show all the updated value correctly except IsEnabled, it will display always null.)

[AcceptVerbs(HttpVerbs.Post)]
        public ActionResult SaveData(User FormValue)
        {
            string message = "";
            return Content(message);
        }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T18:33:49+00:00Added an answer on June 17, 2026 at 6:33 pm

    You must delete this code ( if use jquery ajax )

    [AcceptVerbs(HttpVerbs.Post)]

    when you use post back and send class use above code

    send class with jQuery use this code:
    try it:

    $.ajax({
                    type: "post",
                    url: href,
                    dataType: 'json',
                    data: SON.stringify({ FormValue : { ID : $('#controlIdName').val() , Name : $('#ControlName').val() } }),
                    contentType: "application/json; charset=utf-8",
                    success: function (result) {
                        if (result.Success == true) {
                            alert("Success");
                        }
                        else {
                            alert("Error: " + result.Message);
                        }
                    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to check checkbox like $('#riderCheck').attr('checked','true') on some condition. but the problem is
jsscriptfile cssfile I am having problems sending the value from the select box name
i have this problem this is the display from my view.php id menu +1
Problem Detail: In itemCheckout.ftl (freemarker template) I have a drop-down box with check-box associated
i have one problem controlling checkbox, i'm reading, and searching about the topic but
My problem is that when the checkbox below is clicked - the check function
Can check out here alt text http://51hired.com/static/problem.bmp
My Problem is that I want to check if the Arrow up or down
I came across this problem when I want to check what I input is
http://img175.imageshack.us/img175/4295/tableissue.png http://img175.imageshack.us/img175/4295/tableissue.png Here's the picture to begin with. I have this check box, that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.