views:

384

answers:

5

I would like to know your experience with ASP.NET webparts as a reusable component in your website.

How useful did you find it? Did you find any serious issues with it? Would you recommend it using in any asp.net project?

Any best practices or tips you would like to highlight with respect to this.

Would you recommend using webparts as part of the asp.net portal design or would our center your design around our good old UserControl as the foundation.

This input would help me make my decision for an asp.net application that I am developing.

In case you require more clarification please do leave comments.

+2  A: 

I personally wouldn't recommend WebParts for your application unless you are going to go full-blown into the webparts portal paradigm. I played around with them sparingly and it just doesn't feel like it would be as effective as designing your own pieces.

TheTXI
+1  A: 

In my experience web parts are useful to create content for SharePoint. But now with ASP.NET MVC I'm not sure they will be a good choice for a standard ASP.NET application.

Otávio Décio
+1  A: 

I agree with TheTXI...like a lot of ASP.NET technologies, you aren't really going to get much benefit from Web Parts unless you buy into the model 100%.

But aside from that, we had some technical issues as well, mainly related to cross-browser UI rendering problems. These might have been fixed in recent releases, I don't know: we ended up rolling our own solution.

Matt Peterson
+2  A: 

Advantages of WebParts over UserControls:

  1. Support for user editable properties and personalization built in
  2. Customizable Editor Parts
  3. Customizable standard WebPart menus
  4. Drag'n'Drop WebParts between WebPartZones
  5. Support for connections between WebParts, useful for master/detail views, filters, and more
  6. Can load UserControls

Disadvantages:

  1. Higher Resource Usage
  2. Visual Studio currently does not have designer support for WebParts

Like ocdecio mentioned, ASP.NET MVC would probably be a better choice nowadays, at least outside of the SharePoint world, where WebParts are very important.

EDIT:

For an overview of ASP.NET 2.0 WebParts, you may want to look at:

Using WebParts in ASP.Net 2.0 and Personalize Your Portal with User Controls and Custom Web Parts

SchaeferFFM
A: 

ASP.NET MVC is getting so much traction. It is literally blow everything else out of the water. I would recommend look into that first. Sharepoint probably will incorporate MVC very soon.

Chenster