The Panel control provides a container control in an asp.net Web page that can be used as a parent control for static text and other controls.
I. Common Panel Properties
Property |
Description |
HorizontalAlign |
Specifies the alignment of a child control within a panel (left, right, centered, or justified). |
Wrap |
Specifies whether content that is too wide in the panel is to be swapped to the next line or truncated at the edge of the panel. |
ScrollBars |
If you have already limited the Panel control to a specific size by setting the Height and Width properties, you can add scrollbars by setting the ScrollBars property. |
GroupingText |
Renders a border and caption around the Panel control. If a scroll bar is specified, the set GroupingText does not display scroll bars. |
Second, Panel sample code
Panel.aspx
Copy Code code as follows:
<asp:panel id= "Pnlform" runat= "Server" backcolor= "#999966"
Backimageurl= "Http://images.cnblogs.com/cnblogs_com/ylbtech/453730/o_bear.jpg"
Font-bold= "True" forecolor= "#333300"
height= "600px" >
<br/>
Test panel<br/>
<br/>
</asp:Panel>
The resulting HTML is as follows
Copy Code code as follows:
<div style= "color: #333300; Background-color: #999966; Font-weight:bold;height:600px;background-image:url (http:/ /images.cnblogs.com/cnblogs_com/ylbtech/453730/o_bear.jpg); "id=" Pnlform ">
<br>
Test the panel<br>.
<br>
</div>
Operation effect is as follows