script not defined issue
<p>I have a simple aspx page that has a two radio buttons and a few text boxes. Both radio buttons have the same GroupName so when you check one the other is unchecked.  I would like to be able to disable the text boxes under the radio buttons depending on which radio is clicked.  I wrote a method to do that however I am getting an unhandled exception stating 'UseDates_Onclick' is undefined or 'UseWithinThePast_OnClick' is undefined depening on which radio button I check. Any ideas where I am going wrong? </p>

<p><strong>View</strong></p>

<pre><code>&lt;asp:RadioButton ID="RadioButton1" runat="server" Checked="True" GroupName="DateTimeQuery" 
OnClick="UseDates_OnClick"/&gt;
&lt;asp:TextBox ID="startdatetext" runat="server" MaxLength="10"&gt;&lt;/asp:TextBox&gt;
&lt;asp:TextBox ID="enddatetext" Enabled="true" runat="server" MaxLength="10"&gt;&lt;/asp:TextBox&gt;



&lt;asp:RadioButton ID="RadioButton2" runat="server" GroupName="DateTimeQuery" OnClick="UseWithinThePast_OnClick"/&gt;
&lt;asp:TextBox ID="withinthepast" runat="server" Text="1"&gt;&lt;/asp:TextBox&gt;
</code></pre>

<p><strong>Methods</strong></p>

<pre><code>protected void UseDates_OnClick(object sender, EventArgs e)
        {
            withinthepast.Enabled = false;
        }
 protected void UseWithinThePast_OnClick(object sender, EventArgs e)
        {
            startdatetext.Enabled = false;
            enddatetext.Enabled = false;
        }
</code></pre>