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 8700593
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:12:03+00:00 2026-06-13T02:12:03+00:00

Below is the code I’m using. UpdateMultipulGroupContactId = 1,2,3,4; Client Side function function UpdateMultipulGroup()

  • 0

Below is the code I’m using.

UpdateMultipulGroupContactId = "1,2,3,4";

Client Side function

function UpdateMultipulGroup() {
    jQuery.ajax({
        url: "/Json/Contact_Update_Groups_NickName",
        type: "POST",
        data: {
            rid: UpdateMultipulGroupContactId,
            gids: strArray,
            nickname: 'abc'
        },
        dataType: "html",
        success: function (data) {
            var data = JSON.parse(data);
            alert(data.message);
            $("#Notes" + EditContactIdNotes).html($("#txtNotes").val());
            CloseLightBox();
        },
        error: function (error) {
            alert(error);
        }
    });

}

Server Side Function

public ActionResult Contact_Update_Groups_NickName(long rid, List<long> gids, string nickname)

I tried using arrays but I’m getting null values all the time.

How can I pass the UpdateMultipulGroupContactId as a list from this function?

  • 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-13T02:12:05+00:00Added an answer on June 13, 2026 at 2:12 am

    Binding to IList<T>

    This blog post of mine can help substantionally because it basically talks about this very problem. How to bind client data to an IList<T> in the controller action.

    Blog post explains that values actually have to indexed as in

    gids[0] = 1;
    gids[1] = 2;
    

    Sending complex JSON objects

    But I’ve also written a very simple jQuery plugin that does all the conversion from a complex JSON object to an object that will easily be consumed by the MVC model binder. It is also able to consume various data types (dates etc) and convert them correctly for the Asp.net MVC to work out of the box without any changes on the server side.

    By complex objects I mean JSON object with more than one level of hierarchy depth. Because the more complex the JSON object the more manipulation you have to do in your code. Plugin simplifies that to a single function call and providing it your JSON object.

    Using the plugin would change your code to:

    var data = {
        rid: 1234567890, // this is a "long" number
        gids: [1,2,3,4], // or "1,2,3,4".split(",")
        nickname: 'abc'
    };
    
    function UpdateMultipulGroup() {
        jQuery.ajax({
            url: "/Json/Contact_Update_Groups_NickName",
            type: "POST",
            data: $.toDictionary(data),
            success: ...
            ...
         });
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Below code : URL oracle = new URL(http://www.oracle.com/); URLConnection inputStream =oracle.openConnection(); InputStream in =
Below code makes form to be submitted without html5 validation... $j(document).on(click, #client_entry_add, function(event){ ajax_submit();});
The below code doesn't it print the value. function go(x) { alert(x.options.selectedIndex.value); //location=document.menu.student.options[document.menu.student.selectedIndex].value }
The below code is very simple. I have a jQuery autocomplete bound to an
the below code is the JSON response i recieve from an API. unfortunately i
The below code does streaming back to client, in, what I gather is a
Below code gives Too much recursion error in Jquery ui dialog $( #dialog-confirm ).dialog({
Why below code does not work: $('button[name=publish]', 'button[name=cancel]').live('click', function(){ alert('ddddd'); }); The html is
The below code is throwing a syntax error in AppleScript (when using Automator). Any
Below code is dealing with a TYPE* const pointer. struct D { void Check

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.