MVC方式使用EasyUI - 搭建环境

_Layout.cshtml

 1 <!DOCTYPE html>
 2 <html>
 3 <head>
 4     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 5     <meta charset="utf-8" />
 6     <meta name="viewport" content="width=device-width, initial-scale=1.0">
 7     <title>@ViewBag.Title - 我的 ASP.NET 应用程序</title>
 8     @Styles.Render("~/easyui/css")
 9 </head>
10 <body>
11     @RenderBody()
12 
13     @Scripts.Render("~/easyui/js")
14     @RenderSection("scripts", required: false)
15 </body>
16 </html>
View Code

BundleConfig.cs

 1 using System.Web;
 2 using System.Web.Optimization;
 3 
 4 namespace WebApplication1
 5 {
 6     public class BundleConfig
 7     {
 8         public static void RegisterBundles(BundleCollection bundles)
 9         {
10             bundles.Add(new ScriptBundle("~/easyui/js").Include(
11              "~/easyui/jquery.min.js",
12              "~/easyui/jquery.easyui.min.js",
13              "~/easyui/locale/easyui-lang-zh_CN.js"));
14 
15             bundles.Add(new StyleBundle("~/easyui/css").Include(
16                       "~/easyui/themes/bootstrap/easyui.css",
17                       "~/easyui/themes/icon.css"));
18 
19         }
20     }
21 }
View Code

index.cshtml

 1 @{
 2     ViewBag.Title = "Home Page";
 3 }
 4 
 5 <h2>Basic PasswordBox</h2>
 6 <p>The passwordbox allows a user to enter passwords.</p>
 7 <div style="margin:20px 0;"></div>
 8 <div class="easyui-panel" style="width:400px;padding:50px 60px">
 9     <div style="margin-bottom:20px">
10         <input class="easyui-textbox" prompt="Username" iconWidth="28" style="width:100%;height:34px;padding:10px;">
11     </div>
12     <div style="margin-bottom:20px">
13         <input class="easyui-passwordbox" prompt="Password" iconWidth="28" style="width:100%;height:34px;padding:10px">
14     </div>
15 </div>
View Code

猜你喜欢

转载自www.cnblogs.com/win32pro/p/11934849.html