Hello;
In my grid program, I pass string to server using the following code:
var x = "25"; var source = { datatype: "json", type: 'GET', url: 'MyPage.aspx/GetJsonData', formatdata: function () { return { s: x } }, cache: false, datafields: [ { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' } ] };
In the server side, i am getting the string using:
[WebMethod] [ScriptMethod(UseHttpGet = true, ResponseFormat = ResponseFormat.Json)] public static Object GetJsonData(string s) { //Code using s }
it works fine when i pass x = “59” or x = “2384219852598435”
but i want to pass some letters as well, like x = “12@qryq-weqr-uo234-iu34”, but when i try, i keep getting errors.
is there any way i can pass some string with letters ?
is it possible to pass more than one variables?
thanks