Welcome to weblogs.com.pk Sign in | Join | Help

Hosting UserControls into Sharepoint

I am big fan of ASP.NET UserControls. They not only provide a layer of abstraction but also are easy to develop. Everyone in the team picks them quite easily.


Hosting user controls into third party portal engines can be problematic, especially if the portal engines has many expectations/requirements. Original IBUYSPY/Portal Startet Kit were simple, and hosting user control in them just required inheriting user controls from the engine’s base module control.


DotNetNuke requires little rework, especially if your control require logged in user name.


Sharepoint is the hardest (so far), as it need you to write webpart on similar lines as of server control. However you can use third party intermediate webparts, that can let you host your user controls. ReflectionIT.Sharepoint.WebParts is one such webpart. Few points that you should be aware of:


  • Find out file system root folder of your Sharepoint site. Create a bin folder their and copy dlls into this folder. Don’t use FrontPage or WebDAV
  • Create separate folder to place your ascx files, again don’t use FrontPage or WebDAV
  • If you encounter security exceptions, try
    • Add your assemblies, namespaces and types in configuration/SharePoint/SafeControls section of web.config
    • Change configuration/system.web/trust value from WSS_Minimal to WSS_Medium (Refer to MSDN article for more details)
Published Thursday, February 3, 2005 12:33 PM by khurram
Filed under: ,


# re: Hosting UserControls into Sharepoint

Monday, February 14, 2005 10:55 PM by SharePoint We
SharePoint Web Parts and SqlClientPermission Errors
New Comments to this post are disabled