public class TestService : System.Web.Services.WebService
The status property of the “XMLHttpReqeust” object will have a value of 500, the “statusText” will be having “Internal Server Error” as the message and the “responseText” will have the type of error. To solve the problem set the “Content-Type” for the request as shown in the above e.g.
Now let’ see how to pass parameters to a web method.
var xmlHttpReq = new XMLHttpRequest();
//Car Class is pasted below.
public class Car
The output returned in the form of the XML is pasted below.
<?xml version="1.0" encoding="utf-8"?>