Home
%3CLINGO-SUB%20id%3D%22lingo-sub-333149%22%20slang%3D%22en-US%22%3ELoading%20.NET%20UserControls%20inside%20of%20SharePoint%20Webparts%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-333149%22%20slang%3D%22en-US%22%3E%0A%20%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3DUTF-8%22%20%2F%26gt%3B%3CSTRONG%3E%20First%20published%20on%20MSDN%20on%20Nov%2006%2C%202007%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%3CP%3EI%20frequently%20get%20questions%20regarding%20the%20use%20of%20usercontrols%20with%20in%20SharePoint%20WebParts.%20Someone%20often%20has%20a%26nbsp%3Busercontrol%20they'd%20like%20to%20reuse%20inside%20of%20SharePoint.%20Sometimes%20developers%20like%20being%20able%20to%20use%20the%20designer%20views%20in%20Visual%20Studio%20when%20developing%20WebParts.%20%26nbsp%3BIt%20is%20possible%20to%20display%20a%20user%20control%20from%20with%20in%20a%20SharePoint%20WebPart.%20I've%20prodived%20the%20following%20sample%20Visial%20Studio%20Project%20(C%23)%20that%20shows%20how%20to%20do%20this.%20This%20is%20a%20quick%20and%20dirty%20example%2C%20and%20is%20by%20no%20means%20an%20official%20recommendation.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20I%20have%20attached%20the%20sample%20project%20to%20this%20blog%20post.%20(View%20the%20blog%20posting%20individually%20to%20see%20the%20attachment%20download%20link)%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fmsdnshared.blob.core.windows.net%2Fmedia%2FMSDNBlogsFS%2Fprod.evol.blogs.msdn.com%2FCommunityServer.Components.PostAttachments%2F00%2F05%2F93%2F78%2F83%2FMOSS2007UserControlsAndWebParts.zip%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20MOSS2007UserControlsAndWebParts.zip%20%3C%2FA%3E%3C%2FP%3E%0A%20%0A%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-333149%22%20slang%3D%22en-US%22%3EFirst%20published%20on%20MSDN%20on%20Nov%2006%2C%202007%20I%20frequently%20get%20questions%20regarding%20the%20use%20of%20usercontrols%20with%20in%20SharePoint%20WebParts.%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-333149%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Edevelopment%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Eusercontrol%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EWebPart%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft
First published on MSDN on Nov 06, 2007

I frequently get questions regarding the use of usercontrols with in SharePoint WebParts. Someone often has a usercontrol they'd like to reuse inside of SharePoint. Sometimes developers like being able to use the designer views in Visual Studio when developing WebParts.  It is possible to display a user control from with in a SharePoint WebPart. I've prodived the following sample Visial Studio Project (C#) that shows how to do this. This is a quick and dirty example, and is by no means an official recommendation.

I have attached the sample project to this blog post. (View the blog posting individually to see the attachment download link)


MOSS2007UserControlsAndWebParts.zip