I have a simple javascript code as follows
var url = '@Url.Action("Action", "Controller", new { id = "_id_", id2 = "_id2_", id3 = "_id3_", id4 = "_id4", ... })';
used in the ajax calls where idxx is replaced with other values However the var url is generated with "...&id2=id2&..." etc. and i just learned that javascript string.replace() works only on the first occurance
wondering if there's another way to code the var url rather than replace multiple times ?
the solution has to be universally executable i.e. run in older browsers as well