i want to getting the data from server side method and bind it to gridveiw using jquery ajax i did like that
[WebMethod]
public static XElement GetDetails ()
{
APSRKEntities entity = new APSRKEntities();
XElement xml = new XElement("details",
(from A in entity.Stud_Admission
join B in entity.Stud_Promotion on A.StudID equals B.StudId
join C in entity.Stud_EducHistory on B.StudId equals C.StudID
select new { A.FullName, A.AdmissionNo, A.AdmittedInClass, C.PrevSchoolName, B.Batch, B.Class, B.Section, A.StudID }).Where(x => x.Batch == 2013 && x.Class == 3 && x.Section == 1)
);
return xml;
}
and my ajax call is
$('.btn').click(function () {
$.ajax({
type: "post",
url: "Default.aspx/GetDetails",
...
Go to the complete details ...