Asp. NET Visible attributes and HTML display: none, asp. netvisible

Source: Internet
Author: User

Asp. NET Visible attributes and HTML display: none, asp. netvisible

 

As an Asp. NET program, we often encounter interoperability between HTML elements on the client and controls on the WebPage Server. If you do not have a good grasp of the details of the two technologies, it is easy to make some "inexplicable errors ".

One of the most recent mistakes I made was to use the Jquery selector on the client to obtain the HTML elements generated by the server control after assigning the Visible attribute of the server control to False, after several debugging attempts, I used the IE F12 development tool> DOM Resource Manager to find that this element does not exist in the DOM. On MSDN, view the Visible definition discovery. When its property value is set to False, IIS does not generate corresponding page elements in response to the WebPage request from the client.

To learn more, we need to know the specific definition of the CSS style attribute display, as shown below for the sake of warmth.

Browser support

All mainstream browsers support the display attribute.

Definition and usage

The display attribute specifies the type of the box that the element should generate.

Possible Value
Value Description
None This element is not displayed.
Block This element is displayed as a block-level element with a line break before and after it.
Inline Default value. This element is displayed as an inline element, and there is no line break before and after the element.
Inline-block The block element in the row. (Newly added value of CSS2.1)

 

 

Browser support

All mainstream browsers support the visibility attribute.

Definition and usage

The visibility attribute specifies whether the element is visible.

Tip: even invisible elements occupy space on the page. Use the "display" attribute to create invisible elements that do not occupy the page space.

Description

This attribute specifies whether to display the element box generated by an element. This means that the element still occupies its original space, but it can be completely invisible. The value collapse is used to delete columns or rows from the table layout.

Possible Value
Value Description
Visible Default value. The element is visible.
Hidden The element is invisible.
Collapse

When used in table elements, this value can be used to delete a row or column, but it does not affect the layout of the table. The space occupied by rows or columns is reserved for other content. If this value is used on other elements,

It is displayed as "hidden ".

Inherit Specifies that the value of the visibility attribute should be inherited from the parent element.

 

Note: The above information about the display and visiblity are extracted from the http://www.w3school.com.cn/css/index.asp

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.