If I set some control\'s property Visible=\"false\", I cant see the control in the HTML generated of my aspx page. But when I use display:none in style tag for that control,
The Visible
property is a property on the control - when set to false the control doesn't render at all. This is much better then setting display:none
, in which case the control is rendered with a display:none
style, so that the browser won't display it.
The display:none
can be useful if you don't want the control to be visible, but it contains some data that you want to use on the client (through Javascript, say). In such a case setting the Visible
property to false won't work.