i have a set of radiobuttons and few of them i have inside a div tag. upon some condition i have to set this div display to none from server side(.ascx.cs file).

i have tried using this "`divname.Attributes.Add("style","display:none");`" it works for individual input elements but not working for div.

```
<div id="rdcontrol" runat="server" style="display:block">
    <asp:radiobutton id="rd" text="temp" runat="server"/>
    <asp:radiobutton id="rd1" text="temp1" runat="server"/>
</div>

```

codebehind:

```
if(condition)
{
    rdcontrol.Attributes.Add("style","display:none");
}

```

expected: the div should not be displayed.

actual: the div is displayed. when i check through inspect element the div looks like this

```
<div id="rdcontrol" style/>

```

just a style attribute with nothing (neither block nor none)