Monday, March 26, 2012

CallBack issues with AjaxControlToolKit

Greetings.

We recently encountered a problem while using the AjaxControlToolkit library. We have designed a "one-page" project, whereas none of the controls is present in the markup code at startup. At some point after the page has already been rendered we make a AJAX Call to our WebService which is responsible for programmatically creating controls, put them into a server-side page, renders the content, splits markup, javascript and reference scripts, and finally sends this three split up parts to the client through the callback.

This scenario works fine as long, as we stick to the standard webui controls or even the ComponentArt controls. But when we were trying to implement a AjaxControlToolkit control, the whole thing failed. The procedure was nearly the same when adding a normal webui control, only that we had to programmatically add a ToolkitScriptManager to our server-side created page where we throw in all the controls. We added a ToolKit control, rendered the page, split it up as usual and sent the results to the client.

The rendered markup still looked good, and the referenced scriptfiles which the client had to reinclude seemed ok, too. But the javascript rendered throws an error, which we can't tail. On one machine it throws an "AjaxControlToolkit is undefined"- javascript error, on another it throws a syntax error which is very vague.

So has anyone tried to programmatically implement the AjaxControlToolkit recently and any clues to what we seem to have missed? Help is really appreciated since we have some kind of deadline, and really wish to implement the cool features of the toolkit :)

Best regards and thanks in advance.

Hi,

Based on your description, I have a general idea of what are you trying to implement. Though, in my opinion, it's cool but may be not that efficient.

Can you create a small sample to illustrate the issue more intuitively, so that I can use it directly and try to find out the cause.

No comments:

Post a Comment