Tuesday, 16 September 2014

Getting Started with ASP.NET MVC 5

Getting Started

Start by installing and running Visual Studio Express 2013 for Web or Visual Studio 2013.
Visual Studio is an IDE, or integrated development environment. Just like you use Microsoft Word to write documents, you'll use an IDE to create applications. In Visual Studio there's a toolbar along the top showing various options available to you. There's also a menu that provides another way to perform tasks in the IDE. (For example, instead of selecting New Project from the Start page, you can use the menu and select File > New Project.)
 

 

Creating Your First Application

Click New Project, then select Visual C# on the left, then Web and then select ASP.NET  Web Application. Name your project "MvcMovie" and then click OK.

In the New ASP.NET Project dialog, click MVC and then click OK.
Visual Studio used a default template for the ASP.NET MVC project you just created, so you have a working application right now without doing anything! This is a simple "Hello World!" project, and it's a good place to start your application.

Click F5 to start debugging. F5 causes Visual Studio to start IIS Express and run your web app. Visual Studio then launches a browser and opens the application's home page. Notice that the address bar of the browser sayslocalhost:port# and not something like example.com. That's because localhost always points to your own local computer, which in this case is running the application you just built. When Visual Studio runs a web project, a random port is used for the web server. In the image below, the port number is 1234. When you run the application, you'll see a different port number.

Right out of the box this default template gives you  Home, Contact and About pages. The image above doesn't show the HomeAbout and Contact links. Depending on the size of your browser window, you might need to click the navigation icon to see these links.



  
The application also provides support to register and log in. The next step is to change how this application works and learn a little bit about ASP.NET MVC. Close the ASP.NET MVC application and let's change some code.

Related Posts:

  • ASP.NET - Directives ASP.NET - Directives ASP.Net directives are instructions to specify optional settings, such as registering a custom control and page language. These settings describe how the web forms (.aspx) or user controls … Read More
  • ASP.NET - Basic Controls ASP.NET - Basic Controls In this section, we will discuss the basic controls available in ASP.NET Button Controls: ASP .Net provides three types of button controls: buttons, link buttons and image buttons. As the name… Read More
  • ASP.NET - Client Side ASP.NET - Client Side ASP.Net client side coding has two aspects: Client side scripts: that would run on the browser and in turn would speed up the execution of page. For example, client side data validation whic… Read More
  • ASP.NET - Managing State ASP.NET - Managing State HTTP ( Hyper Text Transfer Protocol) is a stateless protocol. When the client disconnects from the server, the ASP.Net engine discards the page objects. This way each web application can sca… Read More
  • ASP.NET - Validators ASP.NET - Validators ASP.Net validation controls validate the user input data to ensure that useless, unauthenticated or contradictory data don.t get stored. ASP.Net provides the following validation controls: Requir… Read More

0 comments:

Post a Comment