i try like below...plz help me.
<script type="text/javascript">
$(document).ready(function () {
$("#getData").click(function () {
// var table = $("#tableID").show();
// table.find("tr+tr").remove();
$.ajax({
url: "WebService.asmx/GetStudents",
data: "{}",
dataType: "json",
type: "POST",
contentType: "application/json; charset=utf-8",
success: function (data) {
$(data.d).each(function (index, item) {
for (var i = 0; i < data.d.length; i++) {
// here how to write to set label value using jquery
// $('#<%= DataList1.FindControl("Label3").ClientID %>').text(item.Id);
// $('#<%= DataList1.FindControl("Label4").ClientID %>').text(item.name);
};
});
},
error: function (a, b, c) {
}
});
});
});
</script>