Any downsides to using ASP.Net AJAX and JQuery together

前端 未结 9 1049
深忆病人
深忆病人 2021-02-04 10:41

We are planning to use the jQuery library to augment our client side JavaScript needs.

Are there any major issues in trying to use both ASP.Net AJAX and jQuery? Both li

相关标签:
9条回答
  • 2021-02-04 11:10

    jQuery has a noConflict() method as a part of the core, but it then requires that you either use jQuery as your named function or something else of your choosing (instead of the dollar selector). However, I will say that the method is often dependent on the implementation of the "competing" library. I have tried to use it for a Ning social network (which used Dojo), and for Magento (which uses Prototype), and I could not get either to play right with jQuery. This is just my personal experience, and others have been very successful.

    http://docs.jquery.com/Core/jQuery.noConflict

    0 讨论(0)
  • 2021-02-04 11:10

    I have been using ext which is another javascript framework with .net. It is far easier to use than old fashioned HTML form controls

    <input type="text" id="whatever" />
    

    Than using ASP.net form controls. You probably want to use the cool javascript framework form validation as opposed to the not so great built in .net validators too, but I guess that's down to your preference

    If you do want to carry on using .net controls, remember that the ID generated in markup is different to what you define, so if you want to reference a control by id in JS use:

    <%=MyControlId.ClientID%>
    
    0 讨论(0)
  • 2021-02-04 11:10

    Apparently, Telerik has begun adding jQuery to some of their RadControls, starting from release Q3.

    I use both jQuery and RadControls, but haven't had the time to look any further into this entanglement...could swing both ways....
    I have an omnius feeling that this entails more clusterf***, but that's just based on general experience with some of this and a little bit of that ;-)

    Check out Atanas Korchev's blog at Telerik on just this subject :
    http://blogs.telerik.com/AtanasKorchev/Posts/08-11-06/ASP_NET_Ajax_Controls_and_jQuery.aspx

    and the best of luck to us all when MS, jQuery, Telerik, JP Morgan and McDonalds all mingle and mash upon our desktops... ;-)

    0 讨论(0)
  • 2021-02-04 11:12

    We have used ASP.NET Ajax, jQuery and Telerik components on a large project for quite a while and haven't had any issues

    I would definitely recommend using jQuery

    0 讨论(0)
  • 2021-02-04 11:12

    A recent development related to this question:

    Scott Guthrie posted on September 28th 2008 (see: http://weblogs.asp.net/scottgu/archive/2008/09/28/jquery-and-microsoft.aspx) that Microsoft will actually begin shipping JQuery with Visual Studio. MVC projects will include the library by default. Scott indicates that this is being done with the consent and encouragement of the JQuery team.

    See the original post for full details.

    0 讨论(0)
  • 2021-02-04 11:16

    The developers of ASP.NET Ajax took specific steps to make sure that the library could be used in conjunction with jQuery.

    For example, the ATLAS CTP (the beta which became ASP.NET Atlas) used to have a $() function, but it was removed and replaced with $get().

    0 讨论(0)
提交回复
热议问题