静态资源包括HTML,CSS,图片和Js文件。在ASP.NET Core 1.0中,静态资源默认的所在目录是wwwroot,wwwroot可以在project.json中定义。

Steps:

  1. 在wwwroot下面添加静态资源;

  2. Startup的Config里面配置:app.UseStaticFiles();

  3. 访问:http://youraddress/yourstaticResources.html 即可。

Static Resources In ASP.NET Core 1.0的更多相关文章

  1. ASP.NET Core 1.0: 指定Static File中的文件作为default page

    指定一个网站的default page是很容易的事情.譬如IIS Management中,可以通过default page来指定,而默认的index.html, index.htm之类,则早已经被设置 ...

  2. 一起学ASP.NET Core 2.0学习笔记(二): ef core2.0 及mysql provider 、Fluent API相关配置及迁移

    不得不说微软的技术迭代还是很快的,上了微软的船就得跟着她走下去,前文一起学ASP.NET Core 2.0学习笔记(一): CentOS下 .net core2 sdk nginx.superviso ...

  3. 从头编写 asp.net core 2.0 web api 基础框架 (1)

    工具: 1.Visual Studio 2017 V15.3.5+ 2.Postman (Chrome的App) 3.Chrome (最好是) 关于.net core或者.net core 2.0的相 ...

  4. 【转载】从头编写 asp.net core 2.0 web api 基础框架 (1)

    工具: 1.Visual Studio 2017 V15.3.5+ 2.Postman (Chrome的App) 3.Chrome (最好是) 关于.net core或者.net core 2.0的相 ...

  5. ASP.NET Core 1.0 Configuration 配置管理

    documentation: https://docs.asp.net/en/latest/fundamentals/configuration.html github: https://github ...

  6. ASP.NET Core 1.0 开发记录

    官方资料: https://github.com/dotnet/core https://docs.microsoft.com/en-us/aspnet/core https://docs.micro ...

  7. [转]Writing Custom Middleware in ASP.NET Core 1.0

    本文转自:https://www.exceptionnotfound.net/writing-custom-middleware-in-asp-net-core-1-0/ One of the new ...

  8. .NET跨平台之旅:将示例站点从 ASP.NET 5 RC1 升级至 ASP.NET Core 1.0

    终于将“.NET跨平台之旅”的示例站点 about.cnblogs.com 从 ASP.NET 5 RC1 升级至 ASP.NET Core 1.0 ,经历了不少周折,在这篇博文中记录一下. 从 AS ...

  9. [译]Writing Custom Middleware in ASP.NET Core 1.0

    原文: https://www.exceptionnotfound.net/writing-custom-middleware-in-asp-net-core-1-0/ Middleware是ASP. ...

随机推荐

  1. AutoLayout 图解各种约束

  2. July 7th, Week 28th Thursday, 2016

    The 79th Anniversary of Anti-Japan War Difficulties vanish when faced bodly. 勇敢面对困难,困难自会退让. The best ...

  3. Maven管理

    来自: http://www.cnblogs.com/bigtall/archive/2011/03/23/1993253.html.

  4. xml配置文件

    xml文件的层级结构      configuration 配置  properties 属性     settings 设置     typeAliases 类型命名     typeHa ...

  5. 20.策略者模式(Stragety Pattern)

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...

  6. How to increase TX Power Signal Strength of WiFi

    转自:https://www.blackmoreops.com/2013/10/27/how-to-increase-tx-power-signal-strength-of-wifi/ This gu ...

  7. 【openGL】四面体

  8. .NET NLog 详解 (三) - LayoutRender

    这期将NLog Git版本指向2005-06-09,NLog v0.9 released.这个时候的代码结构升级为这样: 和上期的版本相比,最明显的莫过于原先的Appender全套更名为Target. ...

  9. C# 重绘tabControl,添加关闭按钮(续)

    在上一篇随笔中,添加关闭按钮是可以实现 ,但细心一点就会发现,每次关闭一个选项卡,tableControl都会自动跳到第一个页面,显然 这不是我们想要的,为此,我修改了部分的代码.除此之外,我还添加了 ...

  10. android 入门-Eclipse 费解的问题

    1.第一次打开eclipse的时候 代码程序出好多红点.等待加载项目,如果加载完项目之后仍然存在,请重启eclipse. 2.如果你在创建页面中的button 的时候,设置了android:gravi ...