Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Panel controls in ASP.NET

    • 0
    • 1
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 355
    Comment on it

    Panel control is works as a container for static text and other controls or we can say that it acts as a parent for other controls in a web page. It displays or hides the other controls as per the need of the program.
    Uses of panel control:-
    1.Generate controls programmatically
    2.Display and hide groups of controls

    The basic syntax of panel control is:-

    <asp :Panel ID= "Panel1"  runat = "server"></asp:Panel>
    

    The panel control does not have its own method or events, it inherits all the properties,methods and events from the WebControl class. WebControl class is the parent class of panel control class.

    Below are the some properties of panel control:-

    Properties Description
    BackImageUrl This is the url of background image which is to be fixed
    DefaultButton Set the identifier for the default button which is in control panel
    Direction For the direction of text in the panel
    GroupingText Groups the text according to field
    HorizontalAlign For the horizontal alignment of the text of panel
    ScrollBars Identify locations of scrollbar in the panel
    Wrap Used to wrap text


    This is the example of declaration of panel control:-

    <asp:Panel id="Panel1" 
         BackImageUrl="url"
         HorizontalAlign="Center|Justify|Left|NotSet|Right" 
         Wrap="True|False"
         runat="server">
    
       (Other controls declared here)
    
    </asp:Panel>
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: