Thursday, January 31, 2008 9:59 PM Luis Abreu

Why can't we see any AJAX Toolkit client side use?

Today I was reading Brad Abrams's blog and I've noticed that he was talking about a book called Microsoft Ajax Library Essentials. At the end Brad says that "(...) I think the book misses out on talking about how to use the Ajax Control Toolkit completely from client side javascript, but maybe that is for the 2nd edition ;-)".

I think that I can answer that. The last time I looked (and I know it was really a long time ago), that wasn't really possible. Why? simply because at the time the client error messages were maintained as embedded resources. Unlike what happens with the AJAX library, they didn't have any download for the js files which means that you'd have to 1.) use the ScriptManager control to get those errors injected on the page or 2.)  write some code that would go through the resources and export it to a js file which could be embedded as a resource.

Since several months have passed since then, I'm hoping that I'm wrong on this...though I wouldn't bet on that.

Filed under: ,

Comments

# re: Why can't we see any AJAX Toolkit client side use?

Thursday, January 31, 2008 6:12 PM by Bertrand Le Roy

Couldn't you use this to extract the scripts?

quickstarts.asp.net/.../scriptresources.aspx

# re: Why can't we see any AJAX Toolkit client side use?

Thursday, January 31, 2008 6:22 PM by Luis Abreu

Hello Bertrand.

well, the problem is not with the embedded scripts. Those are available on the source code (even if they weren't, you could always do that by just using .NET Reflector).

I'm talking about the localization of the error messages, which, at the time, were defined in several resx files which were "converted" in JS and injected on the page. I believe that ASP.NET AJAX also uses this approach. The difference is that you can download the client library and get that info in JS files. The last time I've looked, you could not do that with the AJAX Toolkit...Hope that this has been solved in the most recent releases...

# re: Why can't we see any AJAX Toolkit client side use?

Friday, February 01, 2008 2:32 PM by InfinitiesLoop

The extraction tool generates the resource strings, too. It doesn't "just" extract the resource as-is.

# re: Why can't we see any AJAX Toolkit client side use?

Monday, February 04, 2008 3:48 PM by Luis Abreu

ok, why not pack a client only download with everything ready for use?

Leave a Comment

(required) 
(required) 
(optional)
(required)