Wednesday, 27 February 2013

How we can create view in razor syntax

Hi All,

This is my second blog on MVC in asp.net , we are going to learn how i can create view in MVC razor syntax.

If you want to learn how to create mode in MVC  click here


Step 1: Open Microsoft visual studio as show in below images.


Step 2: Create New project from file menu as show in below image.


Step 3: Give project name and project location and click on OK.Open one popup window select empty template and select view engine razor. Open you project as show in below image.Automatic created folder structure.


Step 4: After creating project right click on view folder and add new item as show in below images.


Your view is created you can put on some date and call where you want to call this view.



Enjoy MVC





Thursday, 21 February 2013

How to Create Model in MVC

Hi All,

Today I'll learn how I can create Model in MVC(Model-View-Controller).

If you want to learn how to create vew in MVC  click here

http://mvcdesignpattern.blogspot.in/2013/02/how-we-can-create-view-in-razor-syntax.html

Step 1.  Open visual studio

Step 2. File > New > Project as show in below screen..




Step 3. Select ASP.NET MVC 3 Web Application as show in below screen .



Step 4. After select Asp.net MVC 3 Web application put project name and select location where you want to save that project. after click on ok button show you project as like below screen.



Step 5. Select empty temple and view engine you can select RAZOR or ASPX. Click on ok. show as like below screen




Final step for create mode in mvc..



Right click on model folder and add a class for mode as show in below screen




Enjoy for learn MVC