Simple Control Panel and PlaceHolder

xiaoxiao2021-03-06  40

The information in the MSDN is as follows: PlaceHolder Web Server Control allows you to place empty container controls to page and then dynamically add, remove, or sequentially through sub-elements during runtime. This control only presents its sub-elements; it does not have its own HTML-based output.

For example, you may want to display the number of variable buttons on the web page according to the options selected by the user. In this case, the user does not face the choice that may lead to confusion, that is, those who are either not available, or choose from itself.

The Panel Web Server Control provides a container control in the web form page where you can use the parent of static text and other controls. Panel controls apply to:

Packet behavior You can manage this set of controls as a unit by placing a set of controls into a panel and then manipulating the panel. For example, a set of controls in the panel can be hidden or displayed by setting the Visible property of the panel. Dynamic Controls Generate Panel controls for your controlled containers for controls created at runtime. Appearance Panel Control supports appearance properties such as BackColor and BorderWidth, which you can set these properties to create a unique appearance for local areas on the page.

Pay attention to

When the control and the control like Radiobutton are packet, it is not required.

Panel control.

Obviously, the difference between 2 controls is that the Panel has an output client script, and the PlaceHold is only packet in the server. Therefore, in the case where the controls in the page are packet, the client's script requires simple display / hide, change color, etc., and should use the PaternoLder control.

转载请注明原文地址:https://www.9cbs.com/read-64509.html

New Post(0)