Reputation: 737
The CheckBox dosen't trigger oncheckedchanged event:
<asp:CheckBox ID="ccCritica" runat="server"
style="z-index: 1; right: 15px; top: 100px; position: absolute"
oncheckedchanged="ccCritica_CheckedChanged" />
.
protected void ccCritica_CheckedChanged(object sender, EventArgs e)
{
if(ccCritica.Checked == true)
{
ddSarcinaDep.Enabled = true;
}
}
I've tried with debug and it dosen't call the eventhandler.I'm using Visual Studio 2010 professional, and I'm Developing an ASP.NET Web application.Thanks
Upvotes: 1
Views: 17074
Reputation: 6043
Use the following code:
<asp:CheckBox ID="ccCritica" runat="server" style="z-index: 1; right: 15px; top: 100px; position: absolute" AutoPostBack="true"
oncheckedchanged="ccCritica_CheckedChanged" />
protected void ccCritica_CheckedChanged(object sender, EventArgs e)
{
if (ccCritica.Checked == true)
{
ccCritica.Enabled = true;
}
}
Upvotes: 0