This is a migrated thread and some comments may be shown as answers.

MyWebService.asmx Info

1 Answer 61 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sucheta Patil
Top achievements
Rank 1
Sucheta Patil asked on 31 Aug 2010, 03:08 PM
Hi
I have been through this demo of Grid.
I have created ParkingVisit.aspx form where in I am accepting some visitor information.
I managed to create ParkingVisit.cs file for ParkingVisit.asmx.
But I do not know much about it.
Can you draw some more light on this?

http://demos.telerik.com/aspnet-ajax/grid/examples/client/insertupdatedelete/defaultcs.aspx

Also wht does  it mean by JSON signature?
Do I need to have a reference in web.config file?
I have placed ParkingVisit.cs file un der 'App_Code' folder.

Thanks in advance.
Sucheta

1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 06 Sep 2010, 09:33 AM
Hello Sucheta,

This is a Web service which by definition is a component on a Web server that a client application can call by making HTTP requests. In this certain scenario it is used to update the records of the RadGrid control but it can be used for various other purposes, like performing calculations for example ( you can view a small sample/tutorial on creating such a web service at that address). Further information on Web services can be found in MSDN.

A method with a JSON signature is a method that takes as parameter a JSON object. JSON's signature is the key-value pairs used to represent the data passed. The Web service generates JSON objects which you should be correctly handling when you populate/update your RadGrid control. An example for that is the setValues() javascript method in the demo you are referring to:
function setValues(employee) //employee is a JSON object
            {
                $get("<%= EmployeeID.ClientID %>").innerHTML = employee.EmployeeID;
  
                $find("<%= LastName.ClientID %>").set_value(employee.LastName);
                $find("<%= FirstName.ClientID %>").set_value(employee.FirstName);
                $find("<%= Title.ClientID %>").set_value(employee.Title);
                $find("<%= TitleOfCourtesy.ClientID %>").findItemByText(employee.TitleOfCourtesy).select();
                $find("<%= BirthDate.ClientID %>").set_selectedDate(employee.BirthDate);
                $find("<%= Notes.ClientID %>").set_html(employee.Notes);
  
                $find("<%= LastName.ClientID %>").focus();
            }


 Additionally, you can read more about JSON if you follow this link.

Sincerely yours,
Tsvetina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Sucheta Patil
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or