See below for example code.
My problem is that when the drop down list posts back the event handler for
the check box also executed. I have no idea why this happens?
The only odd thing I can see is [using the trace directive] the viewstate
size bytes of the check box is 0 but after a post back it is non zero.
Any help and advice most welcome!
<!-- Begin ASP.NET Code -->
......
<asp:dropdownlist runat="server" id="lstFontProperties" autopostback="True" />
<asp:checkbox runat="server" id="chkLegend" text="Show Legend"
autopostback="True" />
<asp:textbox runat="server" id="txtLegendTitle" visible="false" />
......
<!-- End ASP.NET Code -->
My page uses code behind and both the drop down list and the check box have
an event handler associated with it self. The textbox only appears when the
check box is checked (txtLegendTitle.Visible = chkLegend.Checked).