I am using one asp.net application where one page data i have to convert it in json format. for this i used this code on this page in page load event

   

            if (Request.QueryString["AppMode"] != null)
            {
                using (WebClient wc = new WebClient())
                {
                    var json = wc.DownloadString("http://localhost:1469/WorldVentures/success-stories");
                }
            }

So here it is validating querystring and based on that it is running this code but as it is running on same site and same page then it is hitting this page load again and again and i am not able to get the json data for this page. Suggest me also here to use content type json in this code.

Related posts

Recent Viewed