Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

We can develop a custom control in Visual studio and deploy it as a webpart to use in SP.

but I head of some other ways, so can you please list possible ways to achieve this? and what's the pros and cons of each?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Well, ultimately you can do anything you could do in ASP.NET - so there are a huge number of options.

Likely candidates include:

  • List View Web Part (Shows data from a table. Pro: easy. Con: limited in control of display)
  • Data View Web Part (Shows data from a variety of sources. Pro: easy, more control. Con: harder to deploy, in my experience.)
  • The SPGridView control (Build into page, web part, user control or web control) (Pro: Gives a nice "SharePointy" looking grid, very like the normal GridView control. Con: You actually have to code it)

I'm guessing that actually what you're asking is should you go for a web part or web control, or user control. Well, that's already been asked, but my thoughts are:

User Controls are good, and Visual Web Parts in 2010 are just wrappers around User Controls.

In WCM sites, or sites where user's shouldn't be able to 'control' how the page looks themselves, User Controls or Web Controls are the way to go. User's can't change them; they are restricting.

In sites where users do need to be able to control how the page looks - like collaboration sites - then I'd suggest going for web parts.

Does that help?

share|improve this answer
    
thanks for the detailed answer, I heard of something else too, maybe called Dataform for a list in sharepoint (using xslt). how about that? –  Bassel Alkhateeb Dec 9 '10 at 11:08
    
Dataform is just another name for the Data View web part. So yeah, that'd be fine. –  Andy Burns Dec 10 '10 at 15:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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