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

  • SEARCH
  • Home
  • 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 7681385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:19:46+00:00 2026-05-31T18:19:46+00:00

I have an asp.net mvc app, using JQuery UI dialog. I’m trying to submit

  • 0

I have an asp.net mvc app, using JQuery UI dialog. I’m trying to submit form data to the controler action method. I do hit the action method but my object has no data. Do you know why?

From Filter.cshtml

$("#selectUnits").dialog({
        autoOpen: false,
        title: 'Select Units',
        width: 400,
        modal: true,
        minHeight: 200,
        buttons: {

            "Cancel": function () {

                $(this).dialog("close");
            },

            "Submit": function () {

                $.post('/Data/SetUnitNumbers', $("#frmSelectedUnits").submit(), function (data) {

                    alert('This worked');
                });

            }

        }  // END OF BUTTONS

    });  //END OF DIALOG

From Controler…Action Method:

 public void SetUnitNumbers(object data)
    {
        int a = 5;            
    }

From SelectUnits.cshtml where form ‘frmSelectedUnits’ lives. Essentially it is a bunch of checkboxes values that I’m trying to send back to the server:

<body>

<form id="frmSelectedUnits" action="/" >

    <div id="unitNumberCheckboxes" style=" ">
        <div>
             @Html.CheckBox("SelectAllUnitNumbers", false)<label for="SelectAllUnitNumbers"><b>Select/Unselect All Units</b></label>
        </div>
        <div id="unitCheckboxes">


             @foreach (var item in Model)
                {                                            
                    <div style="float:left">

                            @Html.CheckBox("UnitNumbers", false)<label for="UnitNumbers">@item.unit_number.ToString().PadLeft(3, '0')&nbsp;&nbsp;&nbsp;</label>

                    </div>
                }                                
        </div>

    </div>

</form>


</body>
  • 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-05-31T18:19:48+00:00Added an answer on May 31, 2026 at 6:19 pm

    jQuery .post is:

    $.post(url, data, success-callback-function);
    

    where data is A map or string that is sent to the server with the request.

    Calling $("#frmSelectedUnits").submit() probably won’t work.

    Try:

    $.post('/Data/SetUnitNumbers', $("#frmSelectedUnits").serialize(), function (data) {
        alert('This worked');
    });
    

    jQuery docs on .serialize()

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ASP.NET MVC 3 app and I'm using jQuery DataTables as grid.
I'm using jquery flexigrid in my asp.net mvc app and fetching the data with
I have an ASP.Net-MVC app using LinqToSql. I have a subcontracts table, a service_lines
Using Unity in an ASP.Net MVC 2 app I have various dependencies on Controllers
I have an ASP.NET MVC server app and client code which uses jquery. I'd
I have simple jQuery Mobile site created using asp.net mvc 2 and uses basic
I'm trying to deploy an ASP.NET MVC 2 app using MsDeploy. I use VS2010
I have a relatively simple ASP.net MVC 2 app that is using SubSonic. Everything
I have an ASP.NET MVC 3 (.NET 4) web application. This app fetches data
I have an Asp.Net MVC app using jqGrid. Can I send the Model 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.