Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

In Info.aspx.cs i get a compressed file from the WebService. After decoding the content i have an xml File. Using XmlToJSON and JavaScriptSerializer the result is a JSON object. How can i use this object in Info.aspx?

share|improve this question

2 Answers

Try this,

var returnValue = new Object();
        returnValue.entityfirst = $("#entityfirst ").val();
        returnValue.entitysecond = $("#entitysecond ").val();
        returnValue.entitythird = $("#entitythird").val();

var request = $.ajax({
                    url: ..., //access method url
                    type: 'POST',
                    cache: false,
                    data: JSON.stringify(returnValue),
                    dataType: 'json',
                    contentType: 'application/json; charset=utf-8'
                });
share|improve this answer

Suppose your json is n below format

 var A={
    propertyOne: "propertyOne",
    propertyTwo: "propertyTwo"
 }

Use as below:

A.propertyOne
A.propertyTwo
share|improve this answer
How does Info.aspx knows that i have ´Var A´ in Info.aspx.cs – Georg 15 hours ago
This is a just example. you can use as your – AKA 15 hours ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.