Monthly Archives: March 2008

Ajax Control Toolkit problem

I need to research this a bit more, but I will give a quick fix that I did.

So, I started an AJAX Web Application in Visual Studio 2008 and then added the latest Ajax Control Toolkit for 3.5.  I made a simple page and wanted to use the Auto Complete Control.  So, I added a simple text box and then added the Auto Complete Extender.  There was then a item to add the event of this control to your code behind.

I got this error:

Cannot create page method “GetCompletionList” because no CodeBehind or CodeFile was found.

I spent quite a few hours looking throuh solutions and couldn’t find anything that was of much help.

I decided to start over.  I created the application a little differently this time.  Instead of a new project, I started a New Web Site.  Repeated the same steps and it works fine.

The problem has to do with VSWebProjectItem.  The standard AJAX Web Application with project file does not consider itself a “Web Project” and causes the AJAX toolkit to error.