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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:10:30+00:00 2026-05-27T06:10:30+00:00

in my previos question Asp MVC 3 json complex object not initialize properties My

  • 0

in my previos question Asp MVC 3 json complex object not initialize properties
My mistake was in JSON convert from Knockout and after one more time with JSON.stringify(data).
Now evering working fine with one parameter,
but I wonder about if I need send to MVC controller two or more parameters one of them is knowckout data = ko.toJSON(viewModel); variable other one is some text.

var settings = ko.toJSON(viewModel);

var parameters = JSON.stringify({ id : *"guid"*, data : settings });

                $.ajax({
                    url: '/KioskAjax/SaveSettings/',
                    type: "POST",
                    data: parameters,
                    dataType: "JSON",
                    contentType: "application/json; charset=UTF-8",
                    success: function (result) {
                        alert('ok');
                    }
                });    


 [HttpPost]
        public JsonResult SaveKiosksSettings(Guid id, GlobalData data)
        {
            return Json(false.ToString(), JsonRequestBehavior.AllowGet);
        }

In this example id is getting value, but GlobalData parameters is null again,
i think this is because I use JSON.stringify again, but how build correct JSON for controller call if I have knowckout object ?

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-27T06:10:30+00:00Added an answer on May 27, 2026 at 6:10 am

    ko.toJSON(myObject) does a ko.toJS(myObject) and then a JSON.stringify(myObject).

    So, you could choose to use ko.toJS(myObject) to get a clean copy of your data and then JSON.stringify it with your other data, as you are already doing.

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

Sidebar

Related Questions

Following on from my previous question, If I am beginning to learn asp.net MVC,
I'm fairly new to asp.net mvc and I have a question. Example model: public
This question is directly related to my previous question ASP.NET AJAX Is it possible
Possible Duplicate: Using ASP.NET Controls without databinding My previous question yielded few results so
This is a followup on the question: ASP.NET next/previous buttons to display single row
Apologies if this is a dumb question. In previous ASP.NET projects, I've been using
This question follows on from a previous question, that has raised a further issue.
Thanks to a previous question I found a useful link on multiple buttons. http://weblogs.asp.net/dfindley/archive/2009/05/31/asp-net-mvc-multiple-buttons-in-the-same-form.aspx
I've created a rudimentary RSSActionResult in ASP.NET MVC to generate an RSS feed based
For an asp.Net MVC project, I will need to handle large files( mostly 200-300Mo,

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.