How can I get the value of an attribute from code behind?
<p>I have a checkbox which is responsible for showing/hiding a div. I created a custom attribute 'myDiv' and put the name of the div which the checkbox is responsible for there.</p>

<pre><code>&lt;asp:CheckBox ID="CheckBox1" myDiv="divRegisteration" myText=" הרשמה - " runat="server" AutoPostBack="true" Font-Size="18px" Font-Bold="true" Text=" הרשמה - הצג" OnCheckedChanged="CheckBox_CheckedChanged"/&gt;
</code></pre>

<p>When I try to get the name of the div from the code behind, I get an error:</p>

<pre><code> protected void CheckBox_CheckedChanged(object sender, EventArgs e)
    {
        if (((CheckBox)(sender)).Checked==true)
        {
            CheckBox chk = (CheckBox)(sender);            
            object div = chk.Parent.FindControl(chk.Attributes["myDiv"]);
</code></pre>

<p>it does not find the attribute "myDiv". for some reason it only finds 2 attributes which I dont even know where they came from. Is there another way to get a custom attribute?</p>
