Reputation: 13
Hi I a have an anchor tag with default object values
<a type="hidden"id="submitExport" href="@Url.Action("ExportAllToExcel", new { strvoicerecordfetchquery = "", nSelectAllten = "", bSelectAll = "" })" ></a>
I want to change values of
strvoicerecordfetchquery ,nSelectAllten and bSelectAll accordingly from script
Upvotes: 0
Views: 189
Reputation: 16
you got a problem with quotes inside quotes in the href attribute and because of that the jquery prop method returns not the whole value of the href
use this html code for your a tag
<a type="hidden"id="submitExport" href="@Url.Action('ExportAllToExcel', new { strvoicerecordfetchquery = '', nSelectAllten = '', bSelectAll = '' })" ></a>
Upvotes: 0
Reputation: 2470
$('a').prop("href", 'Url.Action("ExportAllToExcel", new { newval = "", dd = "", bSenew valdd= "" })');
Upvotes: 1