Posts

Showing posts from May 26, 2013

JSON WEBSERVICE IN ASP.NET

JSONASPNET.zip Here we will see how to return json from asp.net webservice and how to use in our html or aspx page. EXPLANATION: Json is one of the data transfer format like xml.  JSON stands for JAVA SCRIPT OBJECT NOTATION. Now a days may of the application like Google, Facebook, Twitter etc., are using JSON as their data transfer format.  As an asp.net developer you can parse this JSON both in backend coding like C# and client script like JAVASCRIPT.  Taking help of JQuery will be added advantage in parsing the json content. By using a jq uery you can easily call a webservice without any backend technology.  In this case you can create a asp.net webservice that returns json and call you can call it in both html or aspx pages.  This makes webpages lighter & faster. PROCEDURE : Lets create a New asp.net empty website project.  Add webservice with your desired name.  Add the following name spaces System.Web.Script.Serialization & System.Web.Scrip