190 likes | 352 Views
Building ASP.NET Web Parts for Windows SharePoint Services v3. Gayan Peiris Principal Consultant gayanp@uniqueworld.net. Agenda. Build WSS V3.0 Site Build a ASP.NET Web Part in Visual Studio 2005 Modify the Web Part Gallery Deploying the Web Part to WSS V3.0 site. Creating a WSS V3.0 Site.
E N D
Building ASP.NET Web Parts for Windows SharePoint Services v3 Gayan Peiris Principal Consultant gayanp@uniqueworld.net
Agenda • Build WSS V3.0 Site • Build a ASP.NET Web Part in Visual Studio 2005 • Modify the Web Part Gallery • Deploying the Web Part to WSS V3.0 site
Creating a WSS V3.0 Site • Start -> Administrative Tools -> SharePoint 3.0 Central Administration • Application Management Tab • Create Site Collection Link • Create the site • Add the name, Address, Administrator and select the Blank site template
Build Web Part in VS 2005 • Create a Class Library Project • Add reference to System.Web dll • using System.Web; • using System.Web.UI; • using System.Web.UI.WebControls; • using System.Web.UI.WebControls.WebParts; • Inherit from ASP.NET WebPart Class • Override the RenderContents method
Build Web Part in VS 2005 • Build the solution • Deploy the DLL to the BIN directory • Add the Safe Control entry • <SafeControls> other safe controls.. <SafeControl Assembly=“ASPWebPart" Namespace=“ASPWebPart" TypeName="*" Safe="True" /> </SafeControls>
Deploy the Web Part to the Gallery • Navigate to the Site Setting Page by clicking Site Action -> Site Settings
Click New button • Select ASPWebPart.ASPWebPartHello • Click Populate Gallery
Deploying the Web Part • Navigate to Edit Mode • Click Add Web Part • Add a Web Part dialog box will appear. • Click Advance Web Part Gallery and Option link at the bottom