MVC5 Hello Word Application

Hello friends this is my first blog on MVC……..here i am explaining how to start your journey of MVC with hello word application.

Create new project under web project select ASP.NET web application.

mvc_new

Select MVC template from Templates and click ok.

mvc_mvc

Now your MVC project is created. your solution explorer show as given image.

mvc_view

Now add controllers as click on Controllers –> Add –> New Scaffolded Item.

mvc_add_contr

Select MVC5 Controller – Empty and click Add.

mvc_add_contr2

Give controller name and click Add.

mvc_add_contr3

Your controller is added as shown below image.

mvc_add_contr4

Now add view as in solution explorer under views –> HelloWord folder as below image.

mvc_view_add1

Right click on HelloWord folder and click add and select view as shown in below image

mvc_view_add2

Give view name and select Empty template as below image

mvc_view_add3

your view is added as show below image.

mvc_view_add4

Now goto Views –> Home –> Index.cshtml as below image.

mvc_indx

Click on Index.cshtml  and set title and your message as below image.

@{

   ViewBag.Title = “Index”;

}

<h1>This Is MVC Hello Word Application !!!!/</h1>

 

mvc_indx2

 

Now your hello word program is ready !!!! run your program output print as below image.

mvc_output

Enjoy !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Advertisements

One thought on “MVC5 Hello Word Application

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s