JQuery: how to retrieve the id of a C# dynamically created checkbox
<p>I'm dynamically generating checkboxes on my asp page using the following code in the page_load event:</p>

<pre><code> protected void Page_Load(object sender, EventArgs e)
    {
        for (int i = 23; i &lt; 30; i++)
        {
            CheckBox cb = new CheckBox();
            cb.ID = "chkd" + i.ToString();
            cb.Text = "WI " + i.ToString();
            cb.AutoPostBack = true;
            cb.CssClass = "myCheckBoxes";
            Panel1.Controls.Add(cb);
            Panel1.Controls.Add(new LiteralControl("&lt;br&gt;"));
        }
    }
</code></pre>

<p>I'm trying to use JQuery to execute a stored procedure based on the id of the checkbox that was clicked.  However, the id of the box that was clicked is always an empty string.  I'm just getting my feet wet with JQuery so any help would be appreciated.  Below is my JQuery code:</p>

<pre><code>&lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
    $(document).ready(function () {
        $(".myCheckBoxes").click(function (event) {
            $.ajax({
                type: "POST",
                url: "idChecker.aspx",
                data: "id=" + $(this).val(),
                success: function (msg) {
                    if (msg != "None" &amp;&amp; !$("#chkd" + msg).is(':checked')) {
                        $("#chkd" + msg).trigger('click');
                    }
                }
            });
        });
    });

&lt;/script&gt;
</code></pre>
