Monday, October 22, 2007

Use ASP.NET AJAX framework with WSS 3.0

I had to make a custom field type, which uses the AutoComplete from the Ajax Toolkit.

"AutoComplete is an ASP.NET AJAX extender that can be attached to any TextBox control, and will associate that control with a popup panel to display words that begin with the prefix typed into the textbox. "

First I was afraid to begin with this task because of the rumors about the ASP.NET AJAX integration with Office SharePoint Server 2007 and Windows SharePoint Services 3.0 . After all, it turned out better than I expected.

What do we want to achieve:



I think it's unnecessary to write down an how-to. I made use of the following URL's to accomplish it.


The code beneath shows how to define the ascx control [Defines a SharePoint:RenderingTemplate element whichs tells SharePoint how to render your control].



Missing attributes in the AutoCompleteExtender tag:
ServicePath=http://moss/_layouts/WebService/WebService.asmx
ServiceMethod="GetEmployees" MinimumPrefixLength="1"

Chinese? Watch this video: How do I use the ASP.NET AJAX AutoComplete control?

So that's it... Questions / Comments? Feel free!

2 comments:

dhaval said...

I have impletemented, its working fine as administrator, but for other user it's not granting access in server farm.

Any idea ?

Komakino said...

I guess you have problems to access the webservice?

Check the following link: Custom Webservice accessing SharePoint

Let me know if you found a solution.

Regards.