Created
April 21, 2016 02:09
-
-
Save giovannicandido/8d314c4af0a6882b77a25b8574bfbbd8 to your computer and use it in GitHub Desktop.
WebMVC 6 Hello World
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using Microsoft.AspNet.Mvc; | |
namespace WebApplication1.Controllers | |
{ | |
public class HomeController : Controller | |
{ | |
public IActionResult Index() | |
{ | |
return View(); | |
} | |
public IActionResult About() | |
{ | |
ViewData["Message"] = "Your application description page."; | |
return View(); | |
} | |
public IActionResult Contact() | |
{ | |
ViewData["Message"] = "Your contact page."; | |
return View(); | |
} | |
public IActionResult Error() | |
{ | |
return View(); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@{ | |
ViewData["Title"] = "Home Page"; | |
} | |
<div id="myCarousel" class="carousel slide" data-ride="carousel" data-interval="6000"> | |
<ol class="carousel-indicators"> | |
<li data-target="#myCarousel" data-slide-to="0" class="active"></li> | |
<li data-target="#myCarousel" data-slide-to="1"></li> | |
<li data-target="#myCarousel" data-slide-to="2"></li> | |
<li data-target="#myCarousel" data-slide-to="3"></li> | |
</ol> | |
<div class="carousel-inner" role="listbox"> | |
<div class="item active"> | |
<img src="~/images/ASP-NET-Banners-01.png" alt="ASP.NET" class="img-responsive" /> | |
<div class="carousel-caption"> | |
<p> | |
Learn how to build ASP.NET apps that can run anywhere. | |
<a class="btn btn-default btn-default" href="http://go.microsoft.com/fwlink/?LinkID=525028&clcid=0x409"> | |
Learn More | |
</a> | |
</p> | |
</div> | |
</div> | |
<div class="item"> | |
<img src="~/images/Banner-02-VS.png" alt="Visual Studio" class="img-responsive" /> | |
<div class="carousel-caption"> | |
<p> | |
There are powerful new features in Visual Studio for building modern web apps. | |
<a class="btn btn-default btn-default" href="http://go.microsoft.com/fwlink/?LinkID=525030&clcid=0x409"> | |
Learn More | |
</a> | |
</p> | |
</div> | |
</div> | |
<div class="item"> | |
<img src="~/images/ASP-NET-Banners-02.png" alt="Package Management" class="img-responsive" /> | |
<div class="carousel-caption"> | |
<p> | |
Bring in libraries from NuGet, Bower, and npm, and automate tasks using Grunt or Gulp. | |
<a class="btn btn-default btn-default" href="http://go.microsoft.com/fwlink/?LinkID=525029&clcid=0x409"> | |
Learn More | |
</a> | |
</p> | |
</div> | |
</div> | |
<div class="item"> | |
<img src="~/images/Banner-01-Azure.png" alt="Microsoft Azure" class="img-responsive" /> | |
<div class="carousel-caption"> | |
<p> | |
Learn how Microsoft's Azure cloud platform allows you to build, deploy, and scale web apps. | |
<a class="btn btn-default btn-default" href="http://go.microsoft.com/fwlink/?LinkID=525027&clcid=0x409"> | |
Learn More | |
</a> | |
</p> | |
</div> | |
</div> | |
</div> | |
<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev"> | |
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> | |
<span class="sr-only">Previous</span> | |
</a> | |
<a class="right carousel-control" href="#myCarousel" role="button" data-slide="next"> | |
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> | |
<span class="sr-only">Next</span> | |
</a> | |
</div> | |
<div class="row"> | |
<div class="col-md-3"> | |
<h2>Application uses</h2> | |
<ul> | |
<li>Sample pages using ASP.NET MVC 6</li> | |
<li><a href="http://go.microsoft.com/fwlink/?LinkId=518007">Gulp</a> and <a href="http://go.microsoft.com/fwlink/?LinkId=518004">Bower</a> for managing client-side libraries</li> | |
<li>Theming using <a href="http://go.microsoft.com/fwlink/?LinkID=398939">Bootstrap</a></li> | |
</ul> | |
</div> | |
<div class="col-md-3"> | |
<h2>How to</h2> | |
<ul> | |
<li><a href="http://go.microsoft.com/fwlink/?LinkID=398600">Add a Controller and View</a></li> | |
<li><a href="http://go.microsoft.com/fwlink/?LinkID=699314">Add an appsetting in config and access it in app.</a></li> | |
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699315">Manage User Secrets using Secret Manager.</a></li> | |
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699316">Use logging to log a message.</a></li> | |
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699317">Add packages using NuGet.</a></li> | |
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699318">Add client packages using Bower.</a></li> | |
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699319">Target development, staging or production environment.</a></li> | |
</ul> | |
</div> | |
<div class="col-md-3"> | |
<h2>Overview</h2> | |
<ul> | |
<li><a href="http://go.microsoft.com/fwlink/?LinkId=518008">Conceptual overview of what is ASP.NET 5</a></li> | |
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699320">Fundamentals of ASP.NET 5 such as Startup and middleware.</a></li> | |
<li><a href="http://go.microsoft.com/fwlink/?LinkId=398602">Working with Data</a></li> | |
<li><a href="http://go.microsoft.com/fwlink/?LinkId=398603">Security</a></li> | |
<li><a href="http://go.microsoft.com/fwlink/?LinkID=699321">Client side development</a></li> | |
<li><a href="http://go.microsoft.com/fwlink/?LinkID=699322">Develop on different platforms</a></li> | |
<li><a href="http://go.microsoft.com/fwlink/?LinkID=699323">Read more on the documentation site</a></li> | |
</ul> | |
</div> | |
<div class="col-md-3"> | |
<h2>Run & Deploy</h2> | |
<ul> | |
<li><a href="http://go.microsoft.com/fwlink/?LinkID=517851">Run your app</a></li> | |
<li><a href="http://go.microsoft.com/fwlink/?LinkID=517852">Run your app on .NET Core</a></li> | |
<li><a href="http://go.microsoft.com/fwlink/?LinkID=517853">Run commands in your project.json</a></li> | |
<li><a href="http://go.microsoft.com/fwlink/?LinkID=398609">Publish to Microsoft Azure Web Apps</a></li> | |
</ul> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment