I have a small website written in asp.net c#. It consists of 7 pages or less and a master page, connected to a database and references a class library. How to convert it to a visual web part in SharePoint 2013? My colleague advised me of copying the codes from the website solution to a visual web part solution as long as my website solution targets .Net framework 4.0. The question is, is his suggestion feasible? are there any other ways of doing it besides iframes and my colleague's suggestion?

Take into consideration I'm new to SharePoint development and I'm using visual studio 2012.

  • It depends on what the website is all about, if it contains custom forms than Visual Web Part will be good option.. If it contains CMS pages, than maybe you can create Page Layouts with Content Type combination to create all the pages.. Commented Oct 28, 2014 at 17:30
  • Let's say my website contains custom forms, so it'd work if each page of the website is copied into a separate visual web part? What about the master page and the class library?
    – eSS92
    Commented Oct 28, 2014 at 17:45
  • You would need to analyze your database driven code a bit more in detail. If you want to retain logic to access the 3rd party database, the database access strategy comes in to play here.
    – Roman
    Commented Oct 28, 2014 at 22:45

1 Answer 1


Following are high level steps you need to follow

  1. Convert Master Page into SharePoint format.
    • Create an HTML file with the same look and feel as your existing master page
    • Upload CSS/IMAGE/JS into SharePoint Site Assets Library
    • Reference those files in the master page
    • Upload the html file and use Design Manager to convert it into SharePoint master page
  2. Converting back-end (If you want to keep the existing back-end then skip this step)
    • If you are storing data in SQL etc. Then design those tables as SharePoint List
    • Update DAL to use SharePoint List (CRUD operations)
  3. Take each Page, and for each page add a new Visual WebPart to the solution. Convert code etc.
  4. Deploy the solution. This will install all webpart to the Farm
  5. Create Pages and add those visual web part
  • What if my master page contains logic for example, I need it to check the current sharepoint user and then check the users table in the database to enforce permissions according to each user's role. and what about the class library? As for step 5, so for each web part there will be a page?
    – eSS92
    Commented Oct 30, 2014 at 4:22
  • In addition, what to do with Global.asax? Is there something similar in sharepoint?
    – eSS92
    Commented Oct 30, 2014 at 5:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.