Converting a Webpart to sharepoint visual webpart RRS feed

  • Question

  • We developed a web application in which we created usercontrols and webparts using visual studio 2005 and deployed this solution to sharepoint 2007.

    We are planning to upgrade sharepoint 2007 to sharepoint server 2010.

    We require this webapplication to be deployed in to sharepoint server 2010 as visual webpart solution.

    Will this be possibe(Converting a webapplication to  sharepoint solution of type visual webpart)?

    Friday, February 24, 2012 12:45 PM


  • There is no way to do it automatically, but you should be able to convert the code fairly easily.  Just create a new Visual Web part project, copy your existing user control into the project, and then copy and refactor the code behind as necessary to implement the web part.  Most of the web part code you used in VS 2005 will also be usable in 2010 although some of it is builtin so refactoring will be necessary.

    Paul Stork SharePoint Server
    MVP Chief SharePoint Architect: Sharesquared
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

    Friday, February 24, 2012 1:07 PM