S
simonZ
I have checkBox control:
<asp:CheckBox runat="server" ID="chkDelete" Checked="true" />
In code behind, I add stlye to this checkBox:
chkDelete.Style.Add("display", "none");
When page is rendered to the client, the style is performed with span:
<span style="display:none;"><input id="ctl00_ContentPlaceHolder1_chkDelete"
type="checkbox" name="ctl00$ContentPlaceHolder1$chkDelete" checked="checked"
/></span>
and I can't change it with javaScript.
It should be like this:
<input id="ctl00_ContentPlaceHolder1_chkDelete" style="display:none"
type="checkbox" name="ctl00$ContentPlaceHolder1$chkDelete" checked="checked"
/>
If I do with css, the result is the same.
How can I change that?
regards,S
<asp:CheckBox runat="server" ID="chkDelete" Checked="true" />
In code behind, I add stlye to this checkBox:
chkDelete.Style.Add("display", "none");
When page is rendered to the client, the style is performed with span:
<span style="display:none;"><input id="ctl00_ContentPlaceHolder1_chkDelete"
type="checkbox" name="ctl00$ContentPlaceHolder1$chkDelete" checked="checked"
/></span>
and I can't change it with javaScript.
It should be like this:
<input id="ctl00_ContentPlaceHolder1_chkDelete" style="display:none"
type="checkbox" name="ctl00$ContentPlaceHolder1$chkDelete" checked="checked"
/>
If I do with css, the result is the same.
How can I change that?
regards,S