i hav a problm in passing multiple values frm jquery to c# web method
i'm using chosen plug in any 1 help me
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sunny SharmaPosted Sep 3, 2013, 6:31 AM
At server side code, just get the data and split it, like:
string[] AllSelectedOptions = receivedString.split(",");
There you go.
I hope it makes sense.
Happy Coding :)
Arun BPosted Sep 3, 2013, 2:23 AM
Sunny SharmaPosted Sep 3, 2013, 2:22 AM
Arun BPosted Sep 3, 2013, 2:15 AM
Sunny SharmaPosted Sep 3, 2013, 2:12 AM
You just combine the multiple values with a comma as separator in your data param while ajax operation like:
data:{maritalStatus:'Divorced,Never Married,etc,etc'}
that's it.
You can then split the values at server and process them, how's that?
Arun BPosted Sep 3, 2013, 1:59 AM
Arun BPosted Sep 3, 2013, 1:56 AM