user3399326
user3399326

Reputation: 973

how would i retrieve json data in code behind

I am sending json (id) to "page2.aspx" from "page1.aspx". Here's my Page1.aspx

(function load() {                
    return $.get("page2.aspx", {id: "123" },  function (response, status, xhr){     
            //code
    }
}

How would i retrieve 'id' value in page2.aspx in code-behind?

protected void Page_Load(object sender, EventArgs e)
{
   var id = ?
}

Upvotes: 0

Views: 569

Answers (1)

Brian Mains
Brian Mains

Reputation: 50728

Did you try:

 Request["id"]

In the code-behind of the page? It should be accessible using that.

Upvotes: 2

Related Questions