[Vuejs]-MVC form submission need query string with %20 not with '+'

0๐Ÿ‘

If you were submitting a form, the urleconding would be automatically applied. Since you are getting and sending the search query without form submission, just apply a javascript function to encode that fetched value:

this.queryParams.query = searchQuery ? encodeURI(searchQuery): null;

0๐Ÿ‘

You can do like this.

Uri.EscapeUriString(request.Query)

Leave a comment