html code
foreach (DataRow row in dt.Rows)
{
sb.Append("<tr>");
foreach (DataColumn column in dt.Columns)
{
sb.Append("<td>" + row[column.ColumnName].ToString() + "</td>");
}
sb.Append("<td style='TEXT-ALIGN: CENTER;'>");
sb.Append("<a id='cmp' class='btn-edit' href=''>"); sb.Append("<button type='button' id='EditRow' class='btn btn-info btn-xs ' style='margin-right: 10px;'>"); sb.Append("Complete"); sb.Append("</button>"); sb.Append("</a>");
sb.Append("</td>");
sb.Append("</tr>");
}
jquery
$(function () {
$('.btn-edit').click(function () {
$('#cmp').attr('href', 'AddQuestions.aspx');
});
});
[on clicking the complete button another page should open but it only happens when we click the first button on clicking second button the page just reloads][1] [1]: https://i.stack.imgur.com/WxvIV.png