I am developing a website by using ASP.NET. I have a page where user can put advertisements. So after user fills the required fields I am redirect them to another page to review. In that page I am temporally shows what user has entered. So if they wrong they can go back or else can confirm. So I avoid using sessions to pass the data to another page because it has a cost to the server. Also these data are not critical. So I am put them in a Json string and post them.
Here what I have tried.
JavaScriptSerializer json = new JavaScriptSerializer();
Ad = new AdDetails.Ad();
Ad.ContinentIdRef = byte.Parse(ddContinent.SelectedValue);
Ad.ContinentName = ddContinent.SelectedItem.Text;
Ad.CountryIdRef = byte.Parse(ddCountry.SelectedValue);
Ad.CountryName = ddCountry.SelectedItem.Text;
Ad.CityIdRef = UInt16.Parse(ddCity.SelectedValue);
Ad.CityName = ddCity.SelectedItem.Text;
//......
string jsonString = json.Serialize(Ad);
My button code is
<asp:Button ID="btnCheckAd" runat="server" UseSubmitBehavior="false" Text="Check My Add" CssClass="btn btn-success" Width="130" OnClick="btnCheckAd_Click" PostBackUrl="~/CheckAd.aspx" />
So now I want to retrieve this Json string from CheckAd.aspx and read those values to set labels and textboxes values. So how to do that?