Monday, January 30, 2012

Custom Webpart in sp2010

Creating and hosting webpart in sp2010

I recently had a chance to edit an existing custom written webpart and host it in sp2010. It was like we already had an usercontrol in place. Entire functionality was developed inside the usercontrol and it was loaded inside the webpart.

Add a safecontrol entry to the web.config like




Later it was built. The dll from the debug folder is copied and pasted to the bin folder of the virtual directory. And the same was placed in GAC (C:\Windows\assembly).

After refreshing the virtual directory and recycling the application pool. We should be able to browse the sp page in which the webpart was included.

No comments: