hello does anyone knows how to enable and disable a hole div content. i have a div that has a celendar and text boxes as well as dropdownlist etc... and i wanted when the user press a button that the content inside the div was disabled, note that i dont want to make them invisible but enable or disable. Now i know i can make each textbox calendar etc.. disabled individually but i was wondering if there is a way to make the hole div content disabled thus saving some line codes and time. thanks here is the code od the content of the div :
<asp:Calendar ID="mtcDataMR" runat="server" onselectionchanged ="mtcDataMR_SelectionChanged" ></asp:Calendar>
<br />
<asp:TextBox ID="txtData" runat="server" ReadOnly="True"></asp:TextBox>
<br />
</fieldset>
<fieldset>
<legend>Filtrar Marcações</legend>
<br />
Nome de Utente<br />
<asp:CheckBox ID="chkFiltroUtente" text=" " runat="server" AutoPostBack="true" OnCheckedChanged="chkFiltroUtente_CheckedChanged" /><asp:TextBox ID="txtFiltrarNomeUtente" runat="server" AutoPostBack="true" OnTextChanged="txtFiltrarNomeUtente_TextChanged" ReadOnly="True" ></asp:TextBox>
<br />
<br />
<fieldset>
<legend>Tipo de Marcações a Mostrar</legend>
<asp:RadioButton ID="rdbConsultas" text="Consultas" runat="server" GroupName="rdb" AutoPostBack="true" OnCheckedChanged="rdbTratamentos_CheckedChanged" />
<asp:RadioButton ID="rdbTratamentos" text="Tratamentos" runat="server" GroupName="rdb" Autopostback ="true" Checked="True" />
</fieldset>
<br />
Nome de Especialista<br />
<asp:CheckBox ID="chkFiltroEspecialista" Text=" " runat="server" /> <asp:DropDownList runat="server" ID="cbxFiltroEspecialista" OnSelectedIndexChanged ="cbxFiltroEspecialista_SelectedIndexChanged" AutoPostBack="true" /> <br />
Local de Tratamento<br />
<asp:CheckBox ID="chkFiltroLocal" Text=" " runat="server" /> <asp:DropDownList runat="server" ID="cbxLocal" OnSelectedIndexChanged ="cbxFiltroLocal_SelectedIndexChanged" AutoPostBack="true" /> <br />
Hora de Inicio<br />
<asp:CheckBox ID="chkFiltroHora" Text=" " runat="server" /> <asp:DropDownList runat="server" ID="cbxFiltroHora" OnSelectedIndexChanged ="cbxFiltroHora_SelectedIndexChanged" AutoPostBack="true" /> <br />
<fieldset>
<legend> Estados a Apresentar</legend>
<asp:CheckBox ID="chkMRSuspensas" runat="server" text="Mostrar Marcações Suspensas" AutoPostBack ="true" OnCheckedChanged="chkMRSuspensas_CheckedChanged"></asp:CheckBox>
<br />
<asp:CheckBox ID="chkMRCanceladas" runat="server" text="Mostrar Marcações Canceladas" AutoPostBack="true" OnCheckedChanged="chkMRSuspensas_CheckedChanged"></asp:CheckBox>
</fieldset>
<asp:Button text="Limpar Filtros" ID="btnFiltroClear" runat="server" OnClick="btnFiltroClear_Click" />
</fieldset>
</div>
btw what im currently using is (on button click)
mtcDataMR.Enabled = False
txtData.Enabled = False
chkFiltroUtente.Enabled = False
rdbConsultas.Enabled = False
rdbTratamentos.Enabled = False
chkFiltroEspecialista.Enabled = False
chkFiltroLocal.Enabled = False
chkFiltroHora.Enabled = False
chkMRSuspensas.Enabled = False
chkMRCanceladas.Enabled = False
btnFiltroClear.Enabled = False
cbxFiltroEspecialista.Enabled = False
cbxLocal.Enabled = False
cbxFiltroHora.Enabled = False
but as you can see there is so much code lines.