I am two page and i need to pass certain data as json object to other page.

Page1.aspx Code

obj.Name= "My Name";
obj.Age= 30;
obj.Country= "Japan";
.....
.....
string json = JsonConvert.SerializeObject(obj);

Response.redirect("Page2.aspx");

Page2.aspx

How can i pass this information to page2.aspx when i do a redirect.

One way i can do it to pass it as form object in one of the hidden fields and then deserialize it.

I was wondering if there is another easy way.

Related posts

Recent Viewed