mardi 23 décembre 2014

Last Segment in Url get's appended not replaced using javascript in asp.net mvc


I have an issue while update the url Url 1: http://ift.tt/1x9OeU7


After Event firing to search the text based on below code snippit: Url 2: http://ift.tt/1x9Ofal



var url = '@Url.Action("Index", "Home", new { Search = "__SearchKeyword__" })';
url = url.replace('__SearchKeyword__', $("#txtSearch").val());
url = url.replace('?', '');
window.location = url;


I want to replace the last segment and url should look like: Url 3: http://ift.tt/1x9OcLR


Please suggest me.


Note:



URL is dummy.




Aucun commentaire:

Enregistrer un commentaire