5

Difference between Webparts and user controls?

  • Asked: Can you give some more context for your question? A little Web research would tell you the basic differences, but are you trying to solve a specific problem? M. – Marc D Anderson Sep 22 '10 at 12:21
1

I feel the most important difference is that the webparts supports personalization which means that changes in the personal view will be stored per user basis. Also as Rob said, the user has the freedom to add/remove as per his need. On the other hand a usercontrol is more of a kind of static one. So you need to provide a functionality that is not required to be added and removed every now and then.

| improve this answer | |
1

Hopefully others will reply to this, too, and share their experiences using both. In my opinion, user controls are easier to develop and web parts are easier to deploy.

You can allow a user to add a web part to his/her page via the web part gallery if you want to give them permission to do so. To make that possible with a user control you would need to put a wrapper around it.

There are some cases where you must use a user control. One example is when you want to override a delegate control (e.g. you want to create a custom search control to replace the native search control).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.