This is a migrated thread and some comments may be shown as answers.

[Solved] Sending complex object in window AjaxRequest

0 Answers 101 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Kapil
Top achievements
Rank 1
Kapil asked on 22 Jun 2012, 04:34 PM

Hello,

I want to refresh the content of window. In the documentation it shows to send data using the AjaxRequest call but how can you send complex objects?

var model = { 
                            a: "EditPopupForm"
                            b: $('.quoteId').html(), 
                            c: data.CustomerId, 
                            d: 0, 
                            e: "customer",  
                            f: null
            };
  
  
var window = $('#EditWindow).data('tWindow'); 
   
  
window.ajaxRequest('/Edit/Editor', { model: model });

and this is my controller:
public ActionResult CustomerEditor(ComplextObject model)
        {
            .
            .
            .
         }

when I recieve the object all the values are null. Is it possible to send complex object with the AjaxRequest as a parameter???
Tags
General Discussions
Asked by
Kapil
Top achievements
Rank 1
Share this question
or