Client application sends a json array to my .net application. I'm receiving it using name value collection. Now I want to read it's value and assign it to an IN clause of a SQL query.
HttpContext context = HttpContext.Current;
NameValueCollection nvc = context.Request.Form;
string co_json = nvc["co_json"];
// jsArray : [{"roll_number":"11","mark":"68"},{"roll_number":"22","mark":"70"}]";
// I want to get the two roll numbers from above json and need to pass it to SQL
SqlDataAdapter da = new SqlDataAdapter("select * from student_details where roll_number IN ( ???) ", con);
DataTable dt = new DataTable();
da.Fill(dt);