Populate a Razor Section From a Partial

前端 未结 12 1523
不知归路
不知归路 2020-11-27 11:23

My main motivation for trying to do this is to get Javascript that is only required by a partial at the bottom of the page with the rest of the Javascript and not in the mid

12条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-27 11:46

    Use @using(Html.Delayed()){ ...your content... } extensions from answer https://stackoverflow.com/a/18790222/1037948 to render any content (scripts or just HTML) later in the page. Internal Queue should ensure correct ordering.

提交回复
热议问题