Hi, I am using asmx to retrieve some data from DB,
public class TestPage1
{
public int UserID { get; set; }
public string UserName { get; set; }
public string Password { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string MiddleName { get; set; }
}
[WebMethod]
public EntityLayer.TestPage1 GetData(int id)
{
TestPage1 test = TestPage1.GetData(id).SingleOrDefault();
return test;
}
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "WebService.asmx/GetData",
data: "{id}",
dataType: "json"
});
How Do I desrialize test object in javascript?? and is there a better way? thanks