Thursday, June 10, 2010

Three ways to make something invisible on the WebForm

Suppose having a web control called "myContrl". In the code behind, how to make it invisible at run time?
1. myContrl.Visible = false;
2. myContrl.Attributes["style"] = "display:none";
3. myContrl.Height = Unit.Pixel(0);

No comments:

Post a Comment