I finally finished commenting the code samples and cleaned up the slides a touch. Grab everything at the bottom of this post. I cleaned all the DLL's etc. out of the bin/obj folders so that it should email nicely as well.
PLEASE let me know if you find any errors, etc. and I'll update the code samples. Also, if you have any trouble with any of the code samples, feel free to contact me and i'll help you out as best as I can.
Here's the contents of the README.TXT file I included, this way you don't have to download the zip to get the info you need to get AJAX working within SharePoint
STEPS TO ENABLE AJAX ON YOUR SHAREPOINT SERVER
--------------------------------------------------------------------
- Download ASP.NET 2.0 AJAX Extensions 1.0
- (I believe if you install .NET 3.5 you'll already have this)
- it will default install to C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025
- will have to be installed on ALL front-end servers in your FARM
- Optional, install the ASP.NET AJAX Control Toolkit for 34 addtional "Extenders"
- Modify your web.config to allow for using ASP.NET AJAX
- reference this link for the steps of what to do
- http://msdn2.microsoft.com/en-us/library/bb861898.aspx
- or http://sharepoint.microsoft.com/blogs/mike/Lists/Posts/Post.aspx?ID=3
- Add a script manager to your master page (this is the easiest way for now)
- I did this using MS Office SharePoint Designer http://YOURSITE/_catalogs/masterpage/default.master
- I believe you can do this through WebDAV as well
- Add an AJAX enabled WebPart to your site and test!
STEPS TO ADD AJAX WEBPART DEMOS TO YOUR SITE
--------------------------------------------------------------------
- Created my CodeCamp project as a Class Library
- Added System.Web to allow me to work with ASP.NET Controls as objects
- if using ASP.NET AJAX Control Toolkit "Extenders", be sure to add this DLL as a reference in your project
- Sign assembly with a strong name key file
- Changed the build output path to SharePoint site ("C:\Inetpub\wwwroot\wss\VirtualDirectories\30287\bin"), yours will most likely be a different port.
- This is not recommended for production deployments, Best Practice would be to create the WebPart as a feature and deploy/install it that way.
- add Assembly to the SafeControls in my sites Web.Config section
- <SafeControl Assembly="CodeCampDemos, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d756758a26725440" Namespace="CodeCampDemos" TypeName="*" Safe="True" />
- Use Reflector to get proper "Assembly=" text
- Go into the Web Part Gallery and add each individual Web Part to my site available Web Parts
- On main page, switched to Edit Mode, and added my WebParts as needed.
I don't have it in the current code samples/slides, but I want to get a code sample using SmartPart which is a Web Part extension which lets you take existing User Controls that work in your ASPX web pages, and just use them unchanged in your Web Parts within SharePoint 2007. This way you can write the User Control once and use it multiple places. As soon as I get a code sample/demo up, I'll write up a blog posting about it cause it looks pretty helpful.
FILES:
CodeCampDemos.zip (595.84 kb)
e23d3525-b042-4991-a16c-9835ae230e46|1|5.0