Monday, February 21, 2005

Enhancements to Panel control in ASP.NET 2.0

As we know Panel Server control is a container control which can contain other controls within it and help us in laying out the page neatly. There are few interesting enhancements made to this control and the properties or attributes added are as follows:

Scrollbars :: Auto, Both, Horizontal, None and Vertical
Directions :: LeftToRight, NotSet, RightToLeft
Wrap :: True and False
HorizontalAlign :: NotSet, Center, Justify, Left and Right

I wrote a basic code snippet using "Scrollbars" and "Directions" attribute. I have just added that panel code alone here for those who would be interested in knowing the syntax!!

<asp:Panel ID="Panel1" runat="server" Width="100px" Height="100px" ScrollBars="auto" Direction="rightToLeft">
Test msg Test msg Test msg Test msg Test msg Test msg Test msg Test msg Test msg Test msg Test msg Test msg Test msg Test msg Test msg
</asp:Panel>

When I get time I would write about other enhancements/addition made in ASP.NET 2.0.

No comments: