var keyword = encodeURIComponent($("#search").val());
var url = "@Url.Action("SearchResult")" + "?name=" + keyword;
window.location = url;
You have three options:
escape() will not encode: @*/+
encodeURI() will not encode: ~!@#$&*()=:/,;?+'
encodeURIComponent() will not encode: ~!*()'