views:

238

answers:

8
+2  Q: 

UI's in Sharepoint

Our web team has been asked to build some user interfaces in Sharepoint. The UI's would primarily be forms that would need to write to a SQL Server database.

Is ASP.NET the best way to do this? If so what's the best way to integrate the ASP.NET application into Sharepoint?

+3  A: 

You have 4 options:

1. Build web parts 
2. build user controls , and use smart part to display them.
3. use infopath 
4. host the asp.net in an iframe (page viewer web part).

I would go with building web parts, however user controls and smart part are probably quicker, and quickest still is infopath, but infopath wont use the page layouts or master pages that you specify.

if the web app has already been developed then youre looking at option 4, if its not already developed then I would suggest 1 or 2 which gives you the flexibility of reusing the controls elsewhere in the site as well as utilising the sharepoint metadata.

Mauro
A: 

I would combine 1 and 2 of Mauro's answer. Wrap up your user control in your own web part.

AdamBT
A: 

Or you could use data views in Sharepoint to connect to the backend

A: 

Option 2 from Mauro is the quickest and most flexible way. If you use smart part, you just have to focus on developing regular ASP.NET user controls.

Tundey
A: 

If you have MOSS Enterprise, you might want to check out the BDC. There are also some 3rd part web parts that you might check out that will do some of the work for you.

Tom Resing
+1  A: 

You can also build SharePoint "application pages" to do this. This is a decent way to migrate existing pages from the ASP.NET world into a SharePoint app.

IMO, the best decision of all of these reasonable recommendations would depend on the specific functionality you're planning to implement.

Chris Farmer
+2  A: 

Another option: Create your own aspx page, and refer to the default SharePoint master page. Upload it with a feature. This is better than web parts if you want control over the whole page, not just a web part zone. Web parts are better when you want to make it easy for power users to configure functionality and placement.

Application pages are appropriate for system and administration pages, because once copied to the layouts folder, they're available on all your webs. They also have a nice permission model, through inheritance from the LayoutsPageBase class, so you can easily restrict access to some users. But I wouldn't use this for regular users pages, ie. functionality that is part of the application itself.

Bjørn Stærk
A: 

The easiest way to construct UI in SharePoint is by creating a UserControl and then creating your own WebPart and in it using LoadControl to load your UserControl...

Then to have a really responsive app (shameless plug - I'm a developer at Ra-Ajax) you could also use something like Ra-Ajax to get Ajax functionality which should work seamlessly together with SharePoint...

The complete solution would look something like this;

public class MyWebPart : WebPart
{
   protected override OnInit(EventArgs e)
   {
      EnsureChildControls();
      base.OnInit(e);
   }

   override void CreateChildControls()
   {
      LoadControl("SomeUserControlAtSomePath.ascx");
      base.CreateChildControls();
   }
}
Thomas Hansen