How can we load multiple partial views on single view between specific time period?

后端 未结 2 1601
悲哀的现实
悲哀的现实 2020-12-20 01:58

I have multiple partial view on my single view page. Partial views load dynamically. And I want partial views load 1 by 1. Is it possible to do so?

2条回答
  •  清歌不尽
    2020-12-20 02:38

    This approach may be of use to you:

    Render Partial Views using JQuery in MVC3

    It uses jquery and .load(), to call an action that renders your partial view as html and returns it to the javascript, that you'd later place wherever you desire.

    UPDATE:

    If you want to load them in a sequence, one after the other, you can use the complete callback of jquery's load() to chain one after the other.

    If you want to have them load at specific times or intervals, you can use javascript's setTimeout

提交回复
热议问题