protected void HiddenField1_ValueChanged(object sender, EventArgs e) { string[] list = HiddenField1.Value.Split(','); List <string> places = new List <string>(); for (int i = 0; i < list.Length; ++i) { if (list[i] == "true") { places.Add((i + 1).ToString()); } } MySQLServer.add_order(Request.Cookies["login"].Value, session_id, places); Response.Redirect("~/Account/Profile"); }