asp tutorials, asp.net tutorials, sample code, and Microsoft news from 15Seconds
Data Access  |   Troubleshooting  |   Security  |   Performance  |   ADSI  |   Upload  |   Email  |   Control Building  |   Component Building  |   Forms  |   XML  |   Web Services  |   ASP.NET  |   .NET Features  |   .NET 2.0  |   App Development  |   App Architecture  |   IIS  |   Wireless
 
Pioneering Active Server
 Power Search








Active News
15 Seconds Weekly Newsletter
• Complete Coverage
• Site Updates
• Upcoming Features

More Free Newsletters
Reference
News
Articles
Archive
Writers
Code Samples
Components
Tools
FAQ
Feedback
Books
Links
DL Archives
Community
Messageboard
List Servers
Mailing List
WebHosts
Consultants
Tech Jobs
15 Seconds
Home
Site Map
Press
Legal
Privacy Policy
internet.commerce














internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

HardwareCentral
Compare products, prices, and stores at Hardware Central!

Building an ASP.NET 2.0 Web Part for Deployment to WSS V3.0 and MOSS 2007 - Part 2
By Gayan Peiris
Rating: 4.0 out of 5
Rate this article


  • email this article to a colleague
  • suggest an article

    <- Read Part 1 of the Article

    Add the Web Part to the Web Part Gallery

    The next step is to add the web part to the web part gallery. Adding the web part to the web part gallery will make the web part available in the SharePoint site when you want to use it.

    Open the Windows SharePoint Services V3.0 site. Navigate to the Site Setting Page by clicking Site Action -> Site Settings


    Figure 8: Site Action options

    The Site Settings page will display as in Figure 9.


    Figure 9: Site Settings Page

    Click the Web Parts link under the Gallery section.

    The Web Part Gallery page will display as in Figure 10.


    Figure 10: Web Part Gallery page

    In Windows SharePoint Services V2.0, the only way that you could add a web part to the SharePoint site was by using the web part DWP file. In WSS V3.0 there are two types of file supported. They are DWP and WEBPART files. You can see that both file types are supported in Figure 10 in the Web Part Gallery page. The webpart file type is used when you add an ASP.NET 2.0 web part to the web part gallery. The dwp file type is supported when you add a WSS V3.0 web part to the web part gallery. You will be adding a webpart file to support your code example, because you are working on an ASP.NET 2.0 web part.

    You have two options to add a webpart file to the web part gallery. You can upload the web part file by clicking the upload button, or you can click the New button on the tool bar. When you click the New button, SharePoint will read all the web parts in the Safe Control list in the SharePoint web.config file and make them available to the user. In this case, the webpart file will be generated automatically for you. Your ASPNETWebPartHello will be available in the Add Web part list as displayed in figure 11.


    Figure 11: ASPNETWebPartHello in Web Part Gallery: New Web Parts page

    Select the check box in front of ASPNETWebPartHello and click the Populate Gallery button to add the web part to the web part gallery as displayed in Figure 12.


    Figure 12: Hello.webpart web part in the web part Gallery

    Web Part Gallery Options

    You can click the Edit icon in front of the Hello.webpart to update its details as displayed in Figure 13.


    Figure 13: ASPNETWebPartHello web part properties

    Update the Webpart Details

    You can change the Name and the Title and add a Description. The web parts can be grouped together for easy access. I am creating a new group called Litware in the group section. I can navigate to the Litware group to find the Hello web part when I want to add it to the SharePoint page.

    View Webpart File in XML Format

    You can look at the webpart file structure by clicking the View XML tab on the top toolbar. It will open the webpart file in an XML format in the Internet browser as displayed in Figure 14.


    Figure 14: Hello.webpart file in XML format

    Export the Webpart File

    You can export the webpart file to a different location by clicking the Export option on the top toolbar. This is useful when you want to move the web part from one environment to another. This will give you the option to save the webpart file as displayed in figure 15.


    Figure 15: Exporting the Hello.webpart file

    Web Part Display Form

    You can get details about the Hello.webpart file by clicking Hello on the top breadcrumb.


    Figure 16: Breadcrumb trail

    This will open the details page on the Hello web part as displayed in Figure 17.


    Figure 17: Hello.webpart details page.

    You can edit, delete, manage permissions, check out/in and set up alerts for the web part. Figure 18 displays how it looks when you select the alert option.


    Figure 18: Setting up an alert for the Hello.webpart

    Web Part Preview Page

    You can preview the web part functionality from the Web Part Gallery page. Navigate to the Web Part Gallery page and click on the Hello.webpart link or the XML icon in front. The Web Part Gallery Preview Page will be displayed as in Figure 19.


    Figure 19: Web Part Gallery: Web Part Preview page displaying Hello.webpart

    Adding the Web Part to the SharePoint Site

    You have now successfully added the Hello web part to the web part gallery. Now you will add it to the SharePoint site. Open the SharePoint site and select Edit Page from the Site Actions menu as displayed in Figure 20:


    Figure 20: Edit Page option from Site Actions menu

    This will open the page in edit mode. Select a web part zone and click the Add a Web Part link. This will open the Add Web Part page as displayed in Figure 21.


    Figure 21: Add Web Part page

    You created the Litware group to identify the Hello web part easily. Select the Hello web part and click the Add button to add it to the SharePoint site. The final Hello web part will appear in the SharePoint site as displayed in Figure 22.


    Figure 22: Hello Web Part in SharePoint Site

    About the Author

    Gayan Peiris (MVP, MCSD, MCAD, MIT, BComp) is an expert in architecting and designing SharePoint Portals and Windows SharePoint Services solutions. He has written many articles, reviews and columns for various online publications. Gayan is a frequent speaker at Microsoft developer conferences on SharePoint technology. He has been a leading SharePoint advocate since 2001 and is president of the Canberra SharePoint User Group. Gayan been presented with MVP award for Microsoft Office SharePoint Portal Server.

    Gayan works as a Technical Architect/Principal Consultant for Unique World Pty Ltd in Canberra, Australia. He can be reached at http://www.gayanpeiris.com and http://gpeiris.blogspot.com.

  • Rate This Article
    Not HelpfulMost Helpful
    1 2 3 4 5
    Other Articles
    Jul 21, 2005 - N-Tier Web Applications using ASP.NET 2.0 and SQL Server 2005 - Part 1
    While the .NET Framework made building ASP.NET applications easier then it had ever been in the past, .NET 2.0 builds on that foundation in order to take things to the next level. This article shows you to how to construct an N-Tier ASP.NET 2.0 Web application by leveraging the new features of ASP.NET 2.0 and SQL Server 2005.
    [Read This Article]  [Top]
    Apr 28, 2005 - New Files and Folders in ASP.NET 2.0
    With the release of ASP.NET 2.0, Microsoft has greatly increased the power of ASP.NET by introducing a suite of new features and functionalities. As part of this release, ASP.NET 2.0 also comes with a host of new special files and folders that are meant to be used to implement a specific functionality. This article examines these new files and folders in detail and provides examples that demonstrate how to utilize them to create ASP.NET 2.0 applications.
    [Read This Article]  [Top]
    Mar 10, 2005 - The DataSet Grows Up in ADO.NET 2.0 - Part 2, Cont'd
    Alex Homer continues his detailed look at the major changes to the DataSet class. In this part, he looks at two features that allow developers to work with data in a more structured and efficient way when using the DataSet with a SQL Server 2005 database server.
    [Read This Article]  [Top]
    Mar 9, 2005 - The DataSet Grows Up in ADO.NET 2.0 - Part 2
    Alex Homer continues his detailed look at the major changes to the DataSet class. In this part, he looks at two features that allow developers to work with data in a more structured and efficient way when using the DataSet with a SQL Server 2005 database server.
    [Read This Article]  [Top]
    Mar 3, 2005 - The DataSet Grows Up in ADO.NET 2.0 - Part 1, Cont'd
    In this article, Alex Homer looks at the changes between the version 1.x and version 2.0 DataSet and their associated classes, showing you how you can take advantage of the new features to improve your applications' capabilities and performance.
    [Read This Article]  [Top]
    Mar 2, 2005 - The DataSet Grows Up in ADO.NET 2.0 - Part 1
    In this article, Alex Homer looks at the changes between the version 1.x and version 2.0 DataSet and their associated classes, showing you how you can take advantage of the new features to improve your applications' capabilities and performance.
    [Read This Article]  [Top]
    Feb 16, 2005 - Writing a Custom Membership Provider for the Login Control in ASP.NET 2.0
    In ASP.NET 2.0 and Visual Studio 2005, you can quickly program custom authentication pages with the provided Membership Login controls. In this article, Dina Fleet Berry examines the steps involved in using the Login control with a custom SQL Server membership database.
    [Read This Article]  [Top]
    Dec 29, 2004 - ClickOnce Deployment in .NET Framework 2.0
    In this article, Thiru Thangarathinam examines .NET 2.0's new ClickOnce deployment technology that is designed to ease deployment of Windows forms applications. This new technology not only provides an easy application installation mechanism, it also eases deployment of upgrades to existing applications.
    [Read This Article]  [Top]
    Dec 15, 2004 - A Sneak Peek at ASP.NET 2.0's Administrative Tools
    With ASP.NET 2.0, Microsoft has made great strides in increasing developer productivity and has made implementing previously complex solutions relatively easy. Where this version of ASP.NET really shines, however, is in its new administrative tools that allow developers to spend less time managing the configuration of the servers and software and more time developing great code.
    [Read This Article]  [Top]
    Nov 17, 2004 - The ASP.NET 2.0 TreeView Control
    Thiru Thangarathinam introduces ASP.NET 2.0's new TreeView control which provides a seamless way to consume and display information from hierarchical data sources. The article discusses this new control in depth and explains how to use this feature rich control in your ASP.NET applications.
    [Read This Article]  [Top]
    Mailing List
    Want to receive email when the next article is published? Just Click Here to sign up.

    Support the Active Server Industry



    JupiterOnlineMedia

    internet.comearthweb.comDevx.commediabistro.comGraphics.com

    Search:

    Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

    Jupitermedia Corporate Info


    Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

    Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

    Solutions
    Whitepapers and eBooks
    IBM eBook: Planning a Service Oriented Architecture
    IBM eBook: Choosing the Right Architecture--What It Means for You and Your Business
    Microsoft Article: Will Hyper-V Make VMware This Decade's Netscape?
    Avaya Article: Using Intelligent Presence to Create Smarter Business Applications
    Intel Go Parallel Article: Getting Started with TBB on Windows
    Microsoft Article: 7.0, Microsoft's Lucky Version?
    Avaya Article: How to Feed Data into the Avaya Event Processor
    IBM Article: Developing a Software Policy for Your Organization
    Microsoft Article: Managing Virtual Machines with Microsoft System Center
    Intel Go Parallel Article: Intel Threading Tools and OpenMP
    HP eBook: Storage Networking , Part 1
    Microsoft Article: Solving Data Center Complexity with Microsoft System Center Configuration Manager 2007
    MORE WHITEPAPERS, EBOOKS, AND ARTICLES
    Webcasts
    HP Video: StorageWorks EVA4400 and Oracle
    HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
    Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
    MORE WEBCASTS, PODCASTS, AND VIDEOS
    Downloads and eKits
    Red Gate Download: SQL Toolbelt and free High-Performance SQL Code eBook
    Iron Speed Designer Application Generator
    MORE DOWNLOADS, EKITS, AND FREE TRIALS
    Tutorials and Demos
    Silverlight 2 App and Walkthrough: Leverage Silverlight 2 with SQL Server and XML
    IBM Article: Enterprise Search--Do You Know What's Out There?
    HP Demo: StorageWorks EVA4400
    Microsoft Article: The Progress and Promise of Deep Zoom
    Microsoft How-to Article: Get Going with Silverlight and Windows Live
    MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES