This is my code from this code i wanna bind link button and i need to do perform action for the link button
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
$(document).ready(function () {
//GetDetails();
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
dataType: "json",
url: "JSON.aspx/LoadData",
data: "{}",
success: function (response) {
BindTable(response.d);
},
failure: function (data) {
alert('error');
}
});
});
function BindTable(sam) {
var div = document.getElementById('divTbl');
try {
var tbl = document.getElementById('newtable');
if (tbl.id != null) {
div.removeChild(tbl);
}
}
catch (e) {
}
var tab = document.createElement('table');
tab.setAttribute('id', 'newtable');
tab.setAttribute('cellpadding', '0');
tab.setAttribute('cellspacing', '0');
tab.setAttribute('width', '100%');
var body = document.createElement('tbody');
var trow, cell;
var i;
$.each(sam, function (index, emp) {
trow = document.createElement("tr");
for (i = 0; i < 4; i++) {
cell = document.createElement('td');
cell.setAttribute('width', '200px');
var id = emp.Id;
var name = emp.Name;
var code = emp.Code;
var add = emp.Address;
var email = emp.Email;
if (i == 0) {
var hfd = document.createElement('input');
hfd.setAttribute('type', 'hidden');
hfd.setAttribute('id', 'hfd_' + id);
hfd.setAttribute('value', id);
cell.setAttribute("width", "200px")
cell.appendChild(hfd);
cell.appendChild(document.createTextNode(name));
}
else if (i == 1) {
cell.setAttribute("width", "200px");
cell.appendChild(document.createTextNode(code));
}
else if (i == 2) {
var span = document.createElement('span');
cell.setAttribute("width", "200px");
span.setAttribute("display", "inline-block");
span.appendChild(document.createTextNode(email));
cell.appendChild(span);
}
else if (i == 3) {
cell.setAttribute("width", "200px");
cell.appendChild(document.createTextNode(add));
}
trow.appendChild(cell);
}
body.appendChild(trow);
});
tab.appendChild(body);
div.appendChild(tab);
}