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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:56:42+00:00 2026-05-22T02:56:42+00:00

I am using MVC 1.0. I am using JSON.Stringify() from jquery plugin Json2.js to

  • 0

I am using MVC 1.0.

I am using JSON.Stringify() from jquery plugin Json2.js to serialize the javascript objects to send to MVC action method.

I am always getting null in the action method parameters. Am I missing something.

Does this stringify works only in MVC 3.0?? Is it possible to pass javascript objects to action methods in MVC 1.0?

Following blog I referred:
http://haacked.com/archive/2010/04/15/sending-json-to-an-asp-net-mvc-action-method-argument.aspx

Thanks

  • 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-22T02:56:43+00:00Added an answer on May 22, 2026 at 2:56 am

    You can do something like that :

    public void ActionMethod(string objectJson)
    {
        TheClass theObject = new JavaScriptSerializer().Deserialize<TheClass>(objectJson);
    
    }  
    

    and on your page :

    $.ajax({ url: "ActionMethod",
            data: { objectJson: JSON.stringify(theObject) }
        });
    

    In MVC 2 (maybe it works in MVC 1) , if your class is not too complicated you can even do that :

    public void ActionMethod(TheClass theObject)
    {
    }  
    

    +

    $.ajax({ url: "ActionMethod",
        data: theObjectInJson
    });
    

    Of course the fields in theObjectInJson must match TheClass

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

Sidebar

Related Questions

I wrote a custom validator using MVC DataAnnotations and the jQuery unobtrusive javascript library.
I am using ASP MVC with JQuery and posting json data to my controller.
I'm using jqGrid with mvc 2 like this: jQuery(#extension_grid).jqGrid({ url: '/Extension/Report', datatype: json, direction:
I'm using spring MVC for receiving a JSON from client and automatically create an
My mvc page returns json by using the function Json(mycustomclass) to return a JsonResult
Using MVC with an observer pattern, if a user action requires polling a device
I'm using MVC. I copied the login form from the login page and inserted
I am using Spring MVC with JSON as specified in Ajax Simplification Spring 3.0
I´m using mvc futures 2 with WebApiEnabled for XML and JSON support. But due
I am java developer, (using Spring-MVC) never worked much on javascript, But I would

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.