Sharepoint: Web Part vs. ASP.NET User Control

sharepointweb-parts

When creating web parts for Sharepoint, is it better to create an actual web part, or is using and ASP.NET User Control (.ascx) just as good?

I already know how to create the user controls that I need, so it seems like the extra effort of creating a web part is just unnecessary leg work.

What are the advantages of using a web part over just creating and ASP.NET user control?

Best Answer

I am a big fan of user controls except for the simplest web parts. I create a webpart that instantiates and loads the user control. There are other tools out there that you can use to expose your user control, like smartpart, but I would suggest you wrap it up yourself, as it is a good learning experience. Once you have done it once, you basically have a template for any other webpart you want to create.

Good Luck!

Related Topic