Reputation: 139
I have an "&" in one of my parameters passed while making an ajax call. So on the Server-side code while receiving this parameter, only the part before the "&" is available. This Problem Does not occur for Parameters without a "&" substring in it
Tried to use .toString()
var url = '/Configuration/WorkCenters' + '?WorkCenterID=' + $('#WorkCenter_WorkCenterID').val() + '&WorkCenterName=' + $("#WorkCenter_WorkCenterName").val()
so if the Value of $("#WorkCenter_WorkCenterName").val()
is "ABC & DEF" then at the server side i am only able to see "ABC"
Upvotes: 0
Views: 21
Reputation: 185
Use encodeURIComponent(name) to convert to a supported value and try it
Upvotes: 2