i have the following page generated
when i click the Edit link, the record data must be sent to the input boxes on teh same page (without refreshing the pa
Give you 'Edit' link a class name (say) class="edit"
and handle its .click()
event to update the form controls
$('.edit').click(function() {
var cells = $(this).closest('tr').children('td');
$('#Code').val(cells.eq(0).text());
$('#ProdName').val(cells.eq(1).text());
return false; // cancel the default redirect
});
Side note: You could just replace the ActionLink()
code with Edit
and the return false;
line is not necessary.