MVC3 - Ajax loading icon

前端 未结 3 448
攒了一身酷
攒了一身酷 2021-02-02 04:15

I would like to show an AJAX loading icon during an ActionResult request that can take a few seconds to process.

What is the best approach to accomplished this?

3条回答
  •  梦如初夏
    2021-02-02 04:41

    Just my two cents:

    The solution posted by Chris is valid and will work BUT you must add a reference to the two javascript libraries below. Please note that the order matters:

    
    
    

    When you create an MVC application pre-loaded with bundling and all these nu-get packages this will probably not be a problem for you but if you were like me and created an empty ASP.NET MVC application you might run into issues.

提交回复
热议问题