How to add css/script only to a Partial view?

后端 未结 3 2109
挽巷
挽巷 2021-01-06 12:40

I need to load css and scripts only to a specific Partial view but at this moment this link and scripts are loaded in all views. The structure that I have is the main view e

3条回答
  •  日久生厌
    2021-01-06 13:32

    The Simplest way which I have done so far,you can provide Url.Content, to all CSS and Script at _Layout page. Hope so it will resolve your query, without much effort. Example

提交回复
热议问题