private void BindData(string userId, string hostUrl) { int product_id = 0; Int32.TryParse(Request.QueryString["product_id"], out product_id); //Get product data ProductControllerModel model = ProductController.AddProductToBasket(product_id, userId); BasketControllerModel basket = ProductController.GetBasket(product_id, userId); //Throw data to client for script to generate the interface of product var productDetailJson = new System.Web.Script.Serialization.JavaScriptSerializer().Serialize(basket); Server_Data.InnerText = productDetailJson; }