There are existing guides to creating a web part that hosts a user control and others on creating an ASP.NET AJAX-enabled web part. Here I’ll discuss how to create a web part that combines both features. With the user control, you can perform complex layout more easily using the visual designer. And of course, with ASP.NET AJAX you can eliminate full-page postbacks and provide users with a smoother browsing experience.
The walkthrough includes a SoftArtisans.Tutorial.AjaxWebPart for SharePoint 2010 (it can be made to work for SharePoint 2007 with little modification).
SharePoint and ASP.NET AJAX With SharePoint 2007, the first step would be to configure SharePoint to use ASP.NET AJAX. Fortunately, SharePoint 2010 is already enabled for ASP.NET AJAX, so you can avoid performing error-prone surgery on Web.config. |
Step 1: Creating the project
While there are SharePoint project templates, I prefer to use a basic project template for the maximum control and flexibility. It is also more instructive to delve into the nuts and bolts rather than have everything generated for you. Continue reading How to create a web part containing ASP.NET AJAX-enabled user control in SharePoint 2010