views:

102

answers:

3

I am trying to use jQuery and Asp.net Ajax library. The jQuery code is solid, I have it working on a seperate page. When I incorporate the jQuery code into an existing page that using Asp.net Ajax, the jQuery code does not work.

I think this has something to do with name mangling.

How can I stop asp.net from name mangling or whatever else is going on?

Thank you

A: 

Generally, the two frameworks do not interfere with each other. You can run into issues though, since asp.net ajax adds a hole bunch of extra functions to some of the base types like string, int or data.

But usually that is not a problem when only using jquery, but I have had issues with a few plugins that was not written probably, so that might be where your problem is.

With that said, it is hard to give you any concrete help without more information or/and code.

Egil Hansen
+2  A: 

If you're running into major naming issues then leverage QJuery's ability to use almost anything as a selector, including classes. Sure, class lookup isn't as fast as id lookup, but it is far less prone to being mangled by auto-generated code.

Here is a good article detailing How To Work With JQuery in ASP.NET.

Soviut
A: 

Maybe the two frameworks (jQuery and ASP.Net AJAX) collide in defining some operators like the $.

This old forum post is made by someone facing similar situation.

Ashraf Sabry