código HTML
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'); }); });
[al hacer clic en el botón completo, se debería abrir otra página, pero solo sucede cuando hacemos clic en el primer botón al hacer clic en el segundo botón, la página simplemente se vuelve a cargar] [1] [1]: https://i.stack.imgur.com/WxvIV. png