Programmatically Create a Web Part Page with a Web Part in Sharepoint 2010

In this article I am going to explain how to create a web part page along with a web part. After using this feature, we just need to activate the feature; the rest will complete automatically.Steps for creating the functionality:Step 1: Create a project with Farm-Based solutio

C# (227.8 KB)
 
 
 
 
 
(0)
1,857 times
Add to favorites
6/3/2011
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • Your code should be added to the sharepoint bin folder ?!!
    1 Posts | Last post July 09, 2012
    • your code will not work tell you copy the solution dll and past it inside the sharepoint bin folder which is not practicle since we want a package that when we activate should work with it self without any manual steps !
      
      error occured in deployment step activate features assemblies that implement ASP.NET web parts and are installed into a partially trusted location, such as the bin directory, must be compiled with the allowpartiallytrustedcallersattribute set for import to succeed!