MVC4のStyles.Render 質問する

MVC4のStyles.Render 質問する

プロジェクトでは.NET MVC4どのように@Styles.Render機能しますか?

つまり、@Styles.Render("~/Content/css")どのファイルで呼び出されるのですか?

フォルダー内に「css」というファイルやフォルダーがありませんContent

ベストアンサー1

BundleConfigフォルダー内のクラス内で宣言されている特定のバンドルに含まれるファイルを呼び出しますApp_Start

この特定のケースでは、呼び出しは@Styles.Render("~/Content/css")「~/Content/site.css」を呼び出します。

bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/site.css"));

おすすめ記事