asp.net mvc - How to remove %22 from urls in angularjs -
i working in mvc 4 , using angularjs client side scripting.i made edit method posts id of object mvc controller.when click on edit . url generates http://localhost:59568/newsletter/getnewsletterdataang?id=%2256d6ac05afb241256469194b%22
but should be
http://localhost:59568/newsletter/getnewsletterdataang?id=56d6ac05afb241256469194b
because of %22 in front , end throwing 500 error. please suggest me how remove url
to complete comment above i'll let know other thing how send , data using angular js.
if want pass json object server it's better in post using $http service builtin angular in example below:
$http.post(url, jsonobject){...}; by doing so, send json object body of request , in asp.net-mvc model binder can bind json object class in c# code.
in case there no need, said in comments, json.stringfy method call when doing get request.
Comments
Post a Comment