Hey there! I have a JavaScript snippet where I am sending an array to my C# file in JSON format.
var r=['maths','computer','physics']
$.post("Global.aspx", { opt: "postpost", post: w.val(),tags:JSON.stringify(r)
}, function (d) {
});
However, in C#, I am receiving a string like this:
["Maths""Computer""Physics"]
I only want the words 'maths', 'computer', and 'physics' without the brackets and quotation marks. Can you please help me out?
Here is my C# code:
string[] _tags = Request.Form["tags"].ToString().Split(',');
string asd="";
foreach (string ad in _tags) {
asd += ad;
}