Find Unchecked Checkboxes with jQuery and pass the Names to C# Code
<p>This is my code:</p>

<pre><code>public class MyCollection {
        internal static Dictionary&lt;string, CheckBox&gt; MyCheckBox = new Dictionary&lt;string, CheckBox&gt;();
    }


    protected void Page_Load(object sender, EventArgs e) {

        if (!IsPostBack) {
            CheckBox chk1 = new CheckBox();
            chk1.ID = "chk1";
            chk1.Checked = true;
            if (!MyCollection.MyCheckBox.ContainsKey(chk1.ID))
                MyCollection.MyCheckBox.Add(chk1.ID, chk1);

            CheckBox chk2 = new CheckBox();
            chk2.ID = "chk2";
            chk2.Checked = true;
            if (!MyCollection.MyCheckBox.ContainsKey(chk2.ID))
                MyCollection.MyCheckBox.Add(chk2.ID, chk2);

            pl1.Controls.Add(chk1);
            pl2.Controls.Add(chk2);
        }
    }

    protected void btn1Click(object sender, EventArgs e) {
        lit1.Text = "Chk1.Checked: " + MyCollection.MyCheckBox["chk1"].Checked.ToString();
        lit1.Text += "&lt;br /&gt;Chk2.Checked: " + MyCollection.MyCheckBox["chk2"].Checked.ToString();
    }
</code></pre>

<p>i have 2 checkboxes, but always when press the button, Checkboxes.Checked are true, also when i unchecked them,
how can i hold checkboxes in some dictionary like above and check their Checked property in right way?
actualy i do't want any event for change Checkboxes, I Think about a jQuery script, that when i press the button retrive me the name of checkboxes that unchecked
i find a jQuery that can find the checkboxe names that unchecked but i don't know how can pass the names to the c# code?</p>

<p>my above code is just a sample and real project is a user control that dynamically define and render controls from a type, hmm the scenario is like this: the clients add the assembly of user control and declare a property of that named target type, user control read target and for each property decide which control must be add so by overrided RenderContents and other methods can add controls to page, so every control automatically have a Checkbox that enable/disable control and i need the checked property</p>

<p>i find this code in <a href="http://stackoverflow.com/questions/1965075/jquery-loop-through-checkboxes-and-count-each-one-checked-or-unchecked">Stackoverflow...</a></p>

<pre><code>var sList = "";
$('input[type=checkbox]').each(function () {
var sThisVal = (this.checked ? "1" : "0");
sList += (sList=="" ? sThisVal : "," + sThisVal);
});
console.log (sList);
</code></pre>

<p>but this code just write sList on console how can retrive the sList values in C# Code?</p>
