How Can I Have View-Specific <head> contents Using Asp.Net MVC 3 and Razor?

前端 未结 2 769
小鲜肉
小鲜肉 2021-01-31 09:06

I want to link a specific style sheet in certain Views in addition to what already gets linked in _Layout.cshtml. For non-Razor, I see using the content place holder. How woul

2条回答
  •  离开以前
    2021-01-31 09:13

    Surprisingly (to me), asp:ContentPlaceHolder does work. Seems very unrazorish though. I wonder if there's another way?

    Specifically, you put in your _layout.cshtml and

     
        
    
    

    in your view.

提交回复
热议问题