views:

21

answers:

1

Can anybody tell me what is web part and where it is used commonly ?

Why should'nt we use user control instead of it ...(might be this is a blunder..but i donno whats it )

Thanks in advance!

A: 

Webparts are user controls, with some additional functionality.

From MSDN:

Using the Web Parts control set, you as a developer can enable end users to:

  • Personalize page content. Users can add new Web Parts controls to a page, remove them, hide them, or minimize them like ordinary windows.
  • Personalize page layout. Users can drag a Web Parts control to a different zone on a page, or change its appearance, properties, and behavior.
  • Export and import controls. Users can import or export Web Parts control settings for use in other pages or sites, retaining the properties, appearance, and even the data in the controls. This reduces data entry and configuration demands on end users.
  • Create connections. Users can establish connections between controls so that, for example, a chart control could display a graph for the data in a stock ticker control. Users could personalize not only the connection itself, but the appearance and details of how the chart control displays the data.
  • Manage and personalize site-level settings. Authorized users can configure site-level settings, determine who can access a site or page, set role-based access to controls, and so on. For example, a user in an administrative role could set a Web Parts control to be shared by all users, and prevent users who are not administrators from personalizing the shared control.

See MSDN documentation for how to create and use webparts.

Oded
If I need a webpart in all pages, Is it like we have to add web part in all pages...similar to user control ?
Anish Mohan
They _are_ web controls. You can add them to a master page if you want them across all pages, the same way you would normally add a control to a master page.
Oded