Question regarding Visible=false and display:none;

前端 未结 4 1499
挽巷
挽巷 2021-01-18 08:19

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,

4条回答
  •  情书的邮戳
    2021-01-18 08:43

    I can't say which one is better, it's depend on situation. If you want to use that control in client site (i.e. wants to access the control by JavaScript) , you have to set the display to none. But if you don't need it in client-side its better to set the visible to false.

提交回复
热议问题