Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
wiki:user:lorenzo.soncini [2010/07/05 11:44]
lorenzo.soncini
wiki:user:lorenzo.soncini [2010/07/07 11:32] (current)
lorenzo.soncini
Line 1: Line 1:
 ====== ASP.NET Example ====== ====== ASP.NET Example ======
-In this page I wrote a step by step quide for use jqGrid ​with ASP.NET +In this page I wrote a step by step guide for using jqGrid ​and ASP.NET ​webservice for server side.\\ ​have used Visual Studio 2010 Professional and ASP.NET project ​is based on 3.5 version of the framework.  
-I'm using Visual Studio 2010 Professional and ASP.NET project based on versione ​3.5+ 
 +The project is very simple. Just an index.html file for the frontend and a webservice called wsJqTest.asmx that provides data.  
 + 
 +I would use JSON for comunication between client and server  
 + 
 +The result is a simple table with three column FirstName,​LastName,​BirthDate. ​
  
-The project for starting is very simple. Is just an index.html file for the frontend and a webservice called wsJqTest.asmx for get jqGrid data. 
  
-I would use JSON for comunication between client and server 
  
-The result is a simple table with three column FirstName,​LastName,​BirthDate. 
  
 The solution in visual studio are: The solution in visual studio are:
Line 50: Line 52:
 </​note>​ </​note>​
  
-In the webservice source code we need to add some attribute.  +In the webservice source code we need to add some attribute.\\  
-The first is on the class: **[System.Web.Script.Services.ScriptService]**,​ the webservice can be called using ASP.NET AJAX script. +The first is on the class: **[System.Web.Script.Services.ScriptService]**, ​declares that the webservice can be called using ASP.NET AJAX script.\\ 
-The second is on the method: **[System.Web.Script.Services.ScriptMethod(ResponseFormat = System.Web.Script.Services.ResponseFormat.Json)]**,​ the result ​of the webservice was in JSON format+The second is on the method: **[System.Web.Script.Services.ScriptMethod(ResponseFormat = System.Web.Script.Services.ResponseFormat.Json)]**, ​declares that the result ​should be a standard format ​JSON\\
  
 This is the webservice source: This is the webservice source:
Line 199: Line 201:
 {{:​wiki:​user:​jqgridsampleresult.png|jqgridsampleresult.png}}\\ {{:​wiki:​user:​jqgridsampleresult.png|jqgridsampleresult.png}}\\
 and the source code and the source code
-{{:​wiki:​user:​jqgridsample.zip|jqgridsampleresult.png}}+{{:​wiki:​user:​jqgridsample.zip|jqGridSample Source code}}

QR Code
QR Code wiki:user:lorenzo.soncini (generated for current page)