I am passing and argument of type string to an AJAX call. The value i am passing reads as 01007 but when i handle the call at server side, it passes 1007.
Is there a way i can pass the argument as String and get 01007 in the service call? I tried data:"{someKey:" + passedKey.toString() + "}" but it didnt work. Here passedKey is 01007.
Argument type in the service call is string.
Your concatenated JSON string reads
{someKey:01007}.Do you see the problem?
You should pass an object literal, not a JSON string.
jQuery will then serialize it correctly.