ToolBox WepParts Control DeclarativeCatalogPart

DeclarativeCatalogPart Web Server Control

in ASP.NET environment,This article describes you how to work with DeclarativeCatalogPart Web Control.The primary function of the DeclarativeCatalogPart control is to adding catalog of web parts to a web page.Likewise adding other server control to a web page with the declarative format.

Its a major advantage of the DeclarativeCatalogPart control that it does not require any coding when create a catalog of server controls. Page developers can work with the control entirely in the declarative (or page persistence) format, hence the name of the control.he DeclarativeCatalogPart control has a useful property that allows developers to set up a catalog of controls that can be used throughout an entire site

Tool-oriented controls of the Web parts control set have following 2 features:

  • These controls are helper controls which allows the user to personlize controls in a page
  • Those can be visible in certain modes
DeclarativeCatalogPart's Methods
  • GetAvailableWebPartDescriptions - The method retrieves a WebPartDescription object for each WebPart control in the catalog, which enables a DeclarativeCatalogPart control to display information about each server control without having to create an instance of it
  • GetWebPart -This method gets an instance of a particular WebPart control, based on the description passed to the method.

the following code snippets demonstrates how to work with the demonstrates Control

in .aspx page,

<%@ register TagPrefix="uc1" 
  TagName="DisplayModeMenuVB" 
  Src="DisplayModeMenuVB.ascx" %>
<%@ register tagprefix="aspSample" 
  Namespace="Samples.AspNet.VB.Controls" 
  Assembly="UserInfoWebPartVB" %>
  
<html>
  <head id="Head1" runat="server">
    <title>
      DeclarativeCatalogPart Control
    </title>
  </head>
  <body>
    <form id="form2" runat="server">
      <asp:webpartmanager id="wp1" runat="server"  />
      <uc1:DisplayModeMenuCS ID="DisplayModeMenu1" runat="server" />
      <asp:webpartzone id="zone1" runat="server" >
        <PartTitleStyle BorderWidth=1 
          Font-Names="Verdana, Arial"
          Font-Size="110%"
          BackColor="LightBlue" />
        <zonetemplate>
          <asp:BulletedList ID="BulletedList1" 
            Runat="server"
            DisplayMode="HyperLink"
            Title="Favorites">
            <asp:ListItem Value="http://www.gmail.com">
              Gmail
            </asp:ListItem>
          </asp:BulletedList>
        </zonetemplate>
      </asp:webpartzone> 
      <asp:CatalogZone ID="CatalogZone1" runat="server">
        <ZoneTemplate>
          <asp:DeclarativeCatalogPart ID="DeclarativeCatalogPart1"  
            runat="server" 
            Title="Web Parts Catalog"
            ChromeType="TitleOnly" 
            Description="Contains a user control with Web Parts and 
              an ASP.NET Calendar control.">
            <WebPartsTemplate>
              <asp:Calendar ID="Calendar1" runat="server" 
                Title="My Calendar" 
        Description="ASP.NET Calendar control used as a personal calendar." />
              <aspSample:UserInfoWebPart 
                runat="server"   
                id="userinfo1" 
                title = "User Information WebPart"
                Description ="Contains custom, editable user information 
                  for display on a page." />
              <aspSample:TextDisplayWebPart 
                runat="server"   
                id="TextDisplayWebPart1" 
                title = "Text Display WebPart" 
        Description="Contains a label that users can dynamically update." />
            </WebPartsTemplate>              
          </asp:DeclarativeCatalogPart>
        </ZoneTemplate>
      </asp:CatalogZone>
      <asp:EditorZone ID="EditorZone1" runat="server">
      <ZoneTemplate>
    <asp:PropertyGridEditorPart ID="PropertyGridEditorPart1" runat="server" />
      </ZoneTemplate>
      </asp:EditorZone> 
    </form>
  </body>
</html>
        
 
Related Links

Posted by: Admin
Posted on: 9/17/2009 at 4:56 PM
Tags: , ,
Categories: Asp.net
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (5) | Post RSSRSS comment feed

Comments

Onlineatoz.net

Thursday, September 17, 2009 5:17 PM

trackback

ToolBox WepParts Control WebPartZone

ToolBox WepParts Control WebPartZone

diet for a six pack United States

Monday, July 12, 2010 3:42 AM

diet for a six pack

How extended does it bring to obtain a five packIJ The smarter that you are with your efforts then the quicker you might accomplish them A    Modestly  nevertheless  most folks start out seeing final results from their physical exercises and consuming plans inside of one month A    Ita  s not tough to grow your stomach muscles  persons just discover it tricky to remain

sac à main pas cher People's Republic of China

Monday, July 19, 2010 10:50 AM

sac à main pas cher

RTAEUJH NAER  ARTY  TYH   SHY

Criminal Reports United States

Friday, July 30, 2010 4:29 PM

Criminal Reports

What youre saying is completely true.  I know that everybody must say the same thing, but I just think that you put it in a way that everyone can understand.  I also love the images you put in here.  They fit so well with what youre trying to say.  Im sure youll reach so many people with what youve got to say.

Add comment




  Country flag

biuquote
  • Comment
  • Preview
Loading