Advantages and disadvantages of using Ajax update panels in ASP.NET application

前端 未结 5 2005
春和景丽
春和景丽 2020-12-08 05:20

What are the advantages and disadvantages of using Ajax update panels in ASP.NET application. Is there any alternatives available to avoid the use of Ajax update panel?

5条回答
  •  情书的邮戳
    2020-12-08 05:57

    Advantages:

    1. Easy to use and configure (Well, I don't know of any other advantages!)

    Disadvantages:

    See here and here
    Now for the best part, the alternatives:

    Use jQuery's built in support for Ajax to make GET/POST Ajax calls, it's very simple (simpler than the update panel I would say), and absolutely compatible with most browsers!
    An example of using one of the many easy ways jQuery provides for doing Ajax calls:

      $('#anotherContainer').load('/Home/RegularAjaxResource');
    

    This would simply call a server resource (RegularAjaxResource in this case) and display it's returned data on an UI element with id anotherContainer

提交回复
热议问题