我從事一個 ASP.net MVC項目,我有一個包含共享布局中某些部分的視圖,我有三個共享布局視圖,其中一個包含CSS文件,第二個包含Java腳本文件,第三個包含HTML代碼,我用于將它們設置為視圖的一部分。@RenderPage我的觀點包含://html code@RenderPage("~/Views/Shared/_CssPage.cshtml")//html code@RenderPage("~/Views/Shared/_LeftSideBar.cshtml")//html code@RenderPage("~/Views/Shared/_JsPage.cshtml")_CssPage.cshtml : <!-- Favicon--><link rel="icon" href="favicon.ico" type="image/x-icon"><!-- Google Fonts --><link href="https://fonts.googleapis.com/css?family=Roboto:400,700&subset=latin,cyrillic-ext" rel="stylesheet" type="text/css"><link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" type="text/css"><!-- Bootstrap Core Css --><link href="plugins/bootstrap/css/bootstrap.css" rel="stylesheet"><!-- Waves Effect Css --><link href="plugins/node-waves/waves.css" rel="stylesheet" /><!-- Animation Css --><link href="plugins/animate-css/animate.css" rel="stylesheet" /><!-- Morris Chart Css--><link href="plugins/morrisjs/morris.css" rel="stylesheet" /><!-- Custom Css --><link href="css/style.css" rel="stylesheet"><!-- AdminBSB Themes. You can choose a theme from css/themes instead of get all themes --><link href="css/themes/all-themes.css" rel="stylesheet" />_LeftSideBar.cshtml : <!-- Left Sidebar --><aside id="leftsidebar" class="sidebar"> <!-- User Info --> <div class="user-info"> <div class="image"> <img src="images/user.png" width="48" height="48" alt="User" /> </div>
視圖不會在 MVC ASP.NET 呈現 CSS 和 Javascript
九州編程
2022-08-27 15:03:36