Read An Object In C# Which Is Created By Object.defineProperty In JavaScript

75 Views Asked by At

in my JavaScript code section, an object is created with DefineProperty like this :

$("td", tr).each(function (index, td) {

            var field = $(td).attr("data-field");

            var value = $(td).attr("data-value");

            if (field != undefined && value != undefined)
                Object.defineProperty(DataToSend, field, { value: value });

        });

and then DataToSend is sent to a Url using post method and then the sent variable will be got in C# with a code like this

public ActionResult Edit(dynamic DataToSend) {}

how I can read the received DataToSend in csharp ?, I used gettype() and getproperties() from reflection, but those just give me a list with no member.

0

There are 0 best solutions below