I have a .aspx where in I am adding couple of panels dynamically from code behind. I want to show or hide them based on certain conditions. so I am using.

```
Panel P1=new Panel();
Panel P2=new Panel();
P1.Visible=P2.Visible=false;
if(//Panel1 condition is true)
P1.Visible=true;
if(//Panel2 condition is true)
    P2.Visible=true;

```

Now when I look at DOM in developer tools, there is no mark up for corresponding hidden panel. All I see is only visible panel's mark up.
I thought `.Visible=false` will add `display:none` to style of element and `.Visible=true` will add `display:block` to style of element, so I can use javascript to do some DOM manipulation as needed. Was my understanding wrong or what am I missing here?