get ID of clicked control
<p>Using jQuery I'm trying to get the id of control, which I clicked (radiobutton). I read <a href="http://stackoverflow.com/questions/10578566/jquery-this-id-return-undefined">this question</a> and tried almost everything from there:</p>

<pre><code>alert($(this).get(0).id);
alert($(this).id);
alert($(this).attr('id'));
alert(this.id);
</code></pre>

<p>But I'm always getting: <code>Undefined</code></p>

<p>I just don't understand what I'm doing wrong.</p>

<p><strong>UPDATED:</strong></p>

<p>Radiobuttons is generated dynamically in code behind by C#:</p>

<pre><code>controlToReturn = new RadioButton
                    {
                        ID = controlId
                    };
                    ((RadioButton)controlToReturn).Text = text;
                    ((RadioButton)controlToReturn).Checked = Convert.ToBoolean(Convert.ToInt32(value));
                    ((RadioButton)controlToReturn).GroupName = groupName;
                    ((RadioButton)controlToReturn).CssClass = cssClass;
                    ((RadioButton)controlToReturn).Attributes.Add("runat", "server");
                    ((RadioButton)controlToReturn).Attributes.Add("onclick", "Show();");
</code></pre>

<p>and function in ASPX:</p>

<pre><code>&lt;script type="text/javascript" language="javascript"&gt;
function Show() {

             if ($(this).cheked = true) {

                 console.log(this);
                 alert($(this).get(0).id);
                 alert($(this).id);
                 alert($(this).attr('id'));
                 alert(this.id);               
             }        
         }
     &lt;/script&gt;
</code></pre>

<p>I know radiobutton has id, I checked generated HTML.</p>
