What, if any, is the accepted way of adding a key-value pair from ASP.NET/JavaScript code to a C# dictionary? TIA.
What, if any, is the accepted way of adding a key-value pair from ASP.NET/JavaScript
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
How I’ve handled this requirement is to get all the data in a name value pair in javascript, then post this to the server via ajax …
e.g.
loc is your page,
methodName being the WebMethod in code behind page,
arguments you can populate as
On your code behind, create a web method
e.g
I use a generic method to convert this data parameter in codebehind to a Dictionary.
Anyways .. hope this gives you the idea …