logging in or signing up ASP.Net Web Controls and Web Parts aSGuest122948 Download Post to : URL : Related Presentations : Share Add to Flag Embed Email Send to Blogs and Networks Add to Channel Uploaded from authorPOINT lite Insert YouTube videos in PowerPont slides with aS Desktop Copy embed code: Embed: Flash iPad Copy Does not support media & animations WordPress Embed Customize Embed URL: Copy Thumbnail: Copy The presentation is successfully added In Your Favorites. Views: 446 Category: Education License: All Rights Reserved Like it (0) Dislike it (0) Added: December 29, 2011 This Presentation is Public Favorites: 0 Presentation Description sdf Comments Posting comment... Premium member Presentation Transcript ASP.Net Server Controls and Sharepoint 2003 Web Parts: ASP.Net Server Controls and Sharepoint 2003 Web Parts Presented by Paul Turner firstname.lastname@example.orgOverview: Overview What is a control? The 3 types of ASP.Net Controls Web User Controls Rendered Server Controls Composite Server Control Sharepoint Portal Server 2003 Intro to Sharepoint Web Parts from ASP.Net Server Controls Web Part deployment Traditional ASP.Net in Sharepoint 2003What is a Control?: What is a Control? A reusable piece of UI Encapsulates functionality Contains logic Can contain other controls Initialized after the page loadsWeb User Controls: Web User Controls Design: Simple skills required Designed visually in the IDE No design time view Reusability: Low must be included in any project you want to use them inWeb User Controls Demo: Web User Controls DemoWeb User Controls – Summary: Web User Controls – Summary Added within an ASP.Net Application Add new item… Web User Control Create your UI and Logic Drag/Drop on to ASPX pagesRendered Server Controls: Rendered Server Controls Design: Moderate to Expert skills required Completely render HTML Must handle events by implementing interfaces Full design time support Reusability: Very Good Just add it to the toolboxRendered Control Demo: Rendered Control DemoRendered Control - Summary: Rendered Control - Summary Create a new ASP.Net Web Control Project Ensure your class inherits from System.Web.UI.WebControls.WebControl Add using System.Web.UI; into your AssemblyInfo.cs Add TagPrefix into your AssemblyInfo.cs Set AssemblyVersion in your AssemblyInfo.csRendered Control - Summary: Rendered Control - Summary Use the [..] tags i.e. [Description(“..”)] Override the Render method Implement interfaces as required Add a Toolbox Icon Compile the assembly Add it to the toolbox of any project you want to use it inComposite Server Controls: Composite Server Controls Design: Moderate skills required Use standard ASP.Net controls Use standard delegates to handle events Full design time support Reusability: Very Good Just add it to the toolboxComposite Control Demo: Composite Control DemoComposite Control - Summary: Composite Control - Summary Same as Rendered Control but… Override CreateChildControls Create standard ASP.Net objects Add them to the Controls Collection Call EnsureChildControls before calling methods/properties Don’t need to override the Render methodComposite Controls – Sidebar: Composite Controls – Sidebar Why would I use a Composite control? Easier… No need to implement interfaces Can I combine a Composite control with a Rendered control? YES…Sharepoint Portal Server 2003: Sharepoint Portal Server 2003 Sharepoint Portal Server (SPS) is a portal solution that provides document management and searching facilities Provides a portal infrastructure such as membership services, security (via Audiences), and more… SPS 2003 is based on .Net The portal infrastructure can be used for other things by creating WebPartsSPS Demo: SPS DemoWebParts: WebParts Introduced with the Microsoft Digital Dashboard initiative First version was designed for SPS 2001 Now in SPS 2003 WebParts are based on ASP.Net Very similar to ASP.Net server controlsWebPart prerequisites: WebPart prerequisites Get SPS 2003 Get the Microsoft.Sharepoint.* assemblies Install the WebParts Templates for VS.Net Downloadable from the Microsoft Web siteMoving to Webparts: Moving to Webparts Use VS.Net (templates are only available for VB.Net and C#.Net) Create a new WebPart project Use your knowledge of ASP.Net server controls to construct the WebParts functionality Create a Setup CAB project Use the SPS deployment toolsCreate a WebPart Demo: Create a WebPart DemoWebParts - Summary: WebParts - Summary Same as Rendered Controls but… Add: using System.Xml.Serialization; using Microsoft.SharePoint; using Microsoft.SharePoint.Utilities; using Microsoft.SharePoint.WebPartPages; Set [XmlRoot(Namespace=“..”)] for the classWebParts - Summary: WebParts - Summary Ensure your class inherits from Microsoft.SharePoint.WebPartPages.WebPart Set WebPartStorage(…) for the properties Personal – Per user Shared – Global None – Not stored Override RenderWebPart (same as Render method in standard Server controls)WebParts - Summary: WebParts - Summary If you override CreateChildControls you must call the RenderChildren method in the RenderWebPart method Create a Strong Name using sn.exe Set AssemblyKeyFile into your AssemblyInfo.cs to the *.snk file generated by sn.exeDeploying WebParts: Deploying WebParts Create a CAB file project Use the Spsadmin tool in SPS to install the WebPart in to the Virtual Server WebPart collection Uninstall by using Spsadmin Edit the page and add the WebPart to a ZoneDeployment Demo: Deployment DemoTraditional ASP.Net in SPS: Traditional ASP.Net in SPS You can use traditional ASP.Net in SPS Create an IIS Virtual directory under: C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\LAYOUTS Configure it to run under MSSharePointPortalAppPoolTraditional ASP.Net in SPS: Traditional ASP.Net in SPS Access the pages via the _layouts path Turn on ‘Session’ if you need it (SPS turns it off by default) in the web.config in the ..\TEMPLATE\LAYOUTS directory A Web Setup project will do it all for you!!!ASP.Net Demo: ASP.Net DemoSummary: Summary Controls are reusable pieces of UI and logic Web User Controls are easy to create but cannot be easily reused Composite Controls are the next best optionSummary: Summary WebParts are very similar to Composite/Rendered Controls but have a different base class Use the SPS deployment tool and VS.Net to create CAB projects Get into the habit of creating setup projects for ALL your applicationsSummary: Summary ‘Tip of the Iceberg’ Lots more on ASP.Net Controls Lots more on SPS Web Parts Custom toolbox properties Connectable Web Parts Lots more on Setup projects You do not have the permission to view this presentation. In order to view it, please contact the author of the presentation.