I have an <a> tag:
<a id="down" data-Id="" type="button" href="@Url.Action("InvestigatorDetailsDownload", "ClinicalRegistryManager")?investigatorId={data-Id}">download</a>
I am setting this attribute (data-id) from jQuery:
function showInvDetails(id) {
$.ajax({
url: "@Url.Action("
method ", "
controller ")?investigatorId=" + id
}).done(function(data) {
if (data) {
console.log(id);
$('#down').data("Id", id);
}
});
}
I want to set that id in the href of the a tag, how do I do that?