Advertisement
Guest User

Untitled

a guest
Sep 21st, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.72 KB | None | 0 0
  1. <?xml version="1.0"?>
  2.  
  3. <configuration>
  4. <configSections>
  5. <sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
  6. <section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
  7. <section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
  8. </sectionGroup>
  9. </configSections>
  10.  
  11. <system.web.webPages.razor>
  12. <host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
  13. <pages pageBaseType="System.Web.Mvc.WebViewPage">
  14. <namespaces>
  15. <add namespace="System.Web.Mvc" />
  16. <add namespace="System.Web.Mvc.Ajax" />
  17. <add namespace="System.Web.Mvc.Html" />
  18. <add namespace="System.Web.Optimization"/>
  19. <add namespace="System.Web.Routing" />
  20.  
  21. <add namespace="TLN" />
  22. </namespaces>
  23. </pages>
  24. </system.web.webPages.razor>
  25.  
  26. <appSettings>
  27. <add key="webpages:Enabled" value="false" />
  28. </appSettings>
  29.  
  30. <system.webServer>
  31. <handlers>
  32. <remove name="BlockViewHandler"/>
  33. <add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
  34. </handlers>
  35. </system.webServer>
  36.  
  37. <system.web>
  38. <compilation>
  39. <assemblies>
  40. <add assembly="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
  41.  
  42. </assemblies>
  43. </compilation>
  44. </system.web>
  45. </configuration>
  46.  
  47. <?xml version="1.0" encoding="utf-8"?>
  48. <!--
  49. For more information on how to configure your ASP.NET application, please visit
  50. http://go.microsoft.com/fwlink/?LinkId=301880
  51. -->
  52. <configuration>
  53. <appSettings>
  54. <add key="webpages:Version" value="3.0.0.0"/>
  55. <add key="webpages:Enabled" value="false"/>
  56. <add key="ClientValidationEnabled" value="true"/>
  57. <add key="UnobtrusiveJavaScriptEnabled" value="true"/>
  58. </appSettings>
  59. <system.web>
  60. <compilation debug="true" targetFramework="4.5.2"/>
  61. <httpRuntime targetFramework="4.5.2"/>
  62. </system.web>
  63. <runtime>
  64. <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
  65. <dependentAssembly>
  66. <assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed"/>
  67. <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0"/>
  68. </dependentAssembly>
  69. <dependentAssembly>
  70. <assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35"/>
  71. <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0"/>
  72. </dependentAssembly>
  73. <dependentAssembly>
  74. <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35"/>
  75. <bindingRedirect oldVersion="1.0.0.0-1.5.2.14234" newVersion="1.5.2.14234"/>
  76. </dependentAssembly>
  77. <dependentAssembly>
  78. <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35"/>
  79. <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
  80. </dependentAssembly>
  81. <dependentAssembly>
  82. <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35"/>
  83. <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
  84. </dependentAssembly>
  85. <dependentAssembly>
  86. <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/>
  87. <bindingRedirect oldVersion="1.0.0.0-5.2.3.0" newVersion="5.2.3.0"/>
  88. </dependentAssembly>
  89. </assemblyBinding>
  90. </runtime>
  91. <system.codedom>
  92. <compilers>
  93. <compiler language="c#;cs;csharp" extension=".cs"
  94. type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
  95. warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701"/>
  96. <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"
  97. type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
  98. warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE="Web" /optionInfer+"/>
  99. </compilers>
  100. </system.codedom>
  101. </configuration>
  102.  
  103. <!DOCTYPE html>
  104. <html>
  105. <head>
  106. <meta charset="utf-8" />
  107. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  108. <title>@ViewBag.Title - Contoso University</title>
  109. @Styles.Render("~/Content/css")
  110. @Scripts.Render("~/bundles/modernizr")
  111. </head>
  112. <body>
  113. <div class="navbar navbar-inverse navbar-fixed-top">
  114. <div class="navbar-inner">
  115. <div class="container">
  116. <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
  117. <span class="icon-bar"></span>
  118. <span class="icon-bar"></span>
  119. <span class="icon-bar"></span>
  120. </button>
  121. @Html.ActionLink("Contoso University", "Index", "Home", new { area = "" }, new { @class = "navbar-brand" })
  122. <div class="nav-collapse collapse">
  123. <ul class="nav">
  124. <li>@Html.ActionLink("Home", "Index", "Home")</li>
  125. <li>@Html.ActionLink("About", "About", "Home")</li>
  126. <li>@Html.ActionLink("Students", "Index", "Student")</li>
  127. <li>@Html.ActionLink("Courses", "Index", "Course")</li>
  128. <li>@Html.ActionLink("Instructors", "Index", "Instructor")</li>
  129. <li>@Html.ActionLink("Departments", "Index", "Department")</li>
  130. </ul>
  131. </div>
  132. </div>
  133. </div>
  134. </div>
  135.  
  136. <div class="container">
  137. @RenderBody()
  138. <hr />
  139. <footer>
  140. <p>&copy; @DateTime.Now.Year - Contoso University</p>
  141. </footer>
  142. </div>
  143.  
  144. @Scripts.Render("~/bundles/jquery")
  145. @Scripts.Render("~/bundles/bootstrap")
  146. @RenderSection("scripts", required: false)
  147. </body>
  148. </html>
  149.  
  150. @{
  151. Layout = "~/Views/Shared/_Layout.cshtml";
  152. }
  153.  
  154. <!DOCTYPE html>
  155. <html>
  156. <head>
  157. ...
  158. <title>@ViewBag.Title</title>
  159. </head>
  160. <body>
  161. @* this method below should be exist in your body tag *@
  162. @RenderBody()
  163.  
  164. @RenderSection(...)
  165. </body>
  166. </html>
  167.  
  168. @{
  169. ViewBag.Title = "Page Title";
  170. Layout = "~/Views/Shared/_Layout.cshtml";
  171. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement