How can i set the display property to block in the code behind?
pnl.Attrib
You can also do
pnl.Style["display"] = "block";
pnl.Attributes.Add("style", "display:block"); is correct ... got it.
pnl.Attributes.Add("style", "display:block");
Try this :
pnl.Style.Add("display", "block");