Alec Tang

Professional Web Developer/ Web Designer

I build websites based on the latest web standards providing the best possible solution to your company

  • Home
  • About
  • Portfolio
  • Contact
  • Blog
Subscribe Feed

Setting up a core framework for Sharepoint Webpart

Posted by Alec on Wed, 13 Jan 2010, in ASP.NET C#   Sharepoint   Tools   

I was trying to create a web part with WSPBuilder installed on Visual Studio 2008, but had the problem of rendering a user control. Then I came across this blog post, which explains the steps in wrapping usercontrol with WSPBuilder solution. What's even greater is we can setup a structure which seperates the application presentation layer with the WSP project.

One thing though, is that we need to make sure the Assembly registration tag in the usercontrol is above the Control registration tag, or else when we render in Sharepoint, it will complain as Codebind class not found or could not load the assembly error. Greg's post is just excellent and easy to follow.

A sample framework is attached here. Generally, everytime a fresh roll off, we need to:

  1. Rename the both projects to whatever we want to create.
  2. Change the solution file to update the new project names.
  3. In CorePart project, add a new WSPBuilder Web part Feature, that will create all required files.
  4. Update CorePartUI properties -> namespace and also post build event commands to whatever we named CorePart project.
  5. Create a usercontrol in UI project and now start developing.

Everytime we build UI project, everything in it will be compiled to a dll and get placed in Core project's GAC folder. And then what we do is WSPBuilder -> Build the Core project and deploy it. This is a nice platform as we can include as many tools, utilities, functions we use often in the UI (a web application) project, and also be able to use its designer mode to do any design, rather than doing everything in code behind.

Comments Be the first to write a comment. Comment gets approved before publishing.

Post Your Comment

 
 
   

Search

 

Latest Posts

  • List Attachments Open as Read Only
  • Website finally back up from Google's block
  • Sys.WebForms.PageRequestManagerParserErrorException
  • How Google treats Content Duplication
  • How to create HTML column in Sharepoint List View
  • How Sharepoint stores User Data
  • How to send email via Sharepoint
  • Malaysia Airlines launched iPhone Application: MHMobile
  • Intranet, the next big market
  • How to retrieve and update from a multi choice Checkboxlist ...

Categories

  • Browsers (1)
  • Projects (1)
  • Web Design (7)
  • Sharepoint (21)
  • Telerik (5)
  • Wordpress (1)
  • Internet (2)
  • SQL (5)
  • LINQ (3)
  • ASP.NET C# (34)
  • JavaScripts (3)
  • IIS (0)
  • Industry (1)
  • Tools (8)
  • SEO (5)

Archives

  • September 2010 (1)
  • August 2010 (1)
  • May 2010 (1)
  • April 2010 (3)
  • March 2010 (5)
  • February 2010 (4)
  • January 2010 (11)
  • November 2009 (3)
  • October 2009 (1)
  • September 2009 (9)
  • August 2009 (3)
  • July 2009 (4)
  • June 2009 (1)
  • May 2009 (2)
  • April 2009 (8)
  • March 2009 (6)
  • February 2009 (2)
© Copyright 2009 Alec Tang. All Rights Reserved.
This site is conform to W3C Standard XHTML & CSS