Asp. The use method of Panel control in net-basic application

Source: Internet
Author: User

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

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.