Is a Web Part right for this scenario...?
(No Prior Web Part experience)
I'm coming from an ASP.NET (mostly) WebForms background. I'm trying to get my head around creating custom applications within the SharePoint world and the best way to accomplish that. By application, I mean something similar to a basic ASP.NET WebForms site that has multiple pages within it.
I watched a video on Visual Web Parts for SharePoint. The demo consisted of a single page (or rather ascx file). But what about multiple p开发者_StackOverflow中文版ages? Would I use a Visual Web Parts project to recreate an entire ASP.NET application that would be deployed inside of SharePoint? Or is there something else I should be researching?
Thanks.
That sort of requirement is often an indication you should be using an asp.net application rather than SharePoint, but that isn't always possible, so the approach you outline is the right one - There are other options, but a web part, particularly one backed by a user control provides the most flexibility and easy updating. You can access the request in a web part just as you can in a WebForms page.
I recently blogged my current approach to web part development, arrived at after trying all the other approaches over the past few years: ASP.NET MVC 3 Razor Views in SharePoint. If you are used to WebForms, the usercontrol/smartpart approach is also quite good.
精彩评论