i try to return data in web method using linq .. and also i bind grid view in jquery
$(document).ready(function () { BindGridView(); }); function BindGridView() { $.ajax({ type: "POST", url: "WebForm1.aspx/search_data", data: JSON.stingify(obj), data: "{'fromdate':'" + fromdate + "','todate':'" + todate + "','regiondrop':'" + regiondrop + "','GridView1':'" + GridView1 + "'}", contentType: "application/json; charset=utf-8", dataType: "json", async: true, cache: false, success: function (result) { $("#GridView1").empty(); if (data.d.length > 0) { $("#GridView1").append( "<tr><th>Owner Name</th><th>Reg No</th></tr>"); for (var i = 0; i < data.d.length; i++) { $("#GridView1").append("<tr><td>" + data.d[i].OwnerName + "</td> <td>" + data.d[i].RegNo + "</td> <td>" + } } } }); }
webmethod
so how i return this