You need to update the href attribute as
$('#down').attr('href', "@Url.Action("InvestigatorDetailsDownload", "ClinicalRegistryManager")?investigatorId=" + id);
Also note, when using .data() jQuery uses internal cache. The statement .data(key) jQuery useswill read default value only from data-key attribute afterwards it will use internal cache to store arbitrary data associated with element. If you want to update DOM the usestatement .attrdata( key, value ) will store data in internal cache it will not update DOM.