-1

still i develop application with asp.net webform but there is lots of hype regarding asp.net mvc. so i will start reading book on it.

i have couple of basic question regarding asp.net mvc....please have a look and answer.

1) is there will be any really advantage if people develop web apps uisng asp.net mvc instead of webform. if so please discuss few main differences here.

2) how many type of views are there....i hard about razor view....what it is and how many type of views are there like razor.

3) razor available from which version. it is there in asp.net mvc version 2.0

4) i have installed VS2010 and when i open project then i see only asp.net mvc version 2.0 is available. so tell me what i need to install in my machine as a result asp.net mvc 3.0 & 4.0 will be available.

5) can i use gridview and othere controls of asp.net webform in asp.net mvc project? but i go through few mvc code sample and i saw no body is using asp.net webform's control in mvc .... why. it is not allowed.

6) in mvc is there any concept like control event like webform or can we add references of other dll etc.

7) we know that in mvc there are two type of view....one passive & one is MVP-Supervising controller. in MS asp.net mvc does it support like passive view & Supervising controller.

please discuss all the points in detail point wise. thanks a lot.

Thomas
  • 33,544
  • 126
  • 357
  • 626
  • 1
    All your questions can be answered in half an hour by using Google and even searching existing questions here on Stackoverflow. – Nikola Anusev Jul 24 '12 at 14:01

1 Answers1

0

1) is there will be any really advantage if people develop web apps uisng asp.net mvc instead of webform. if so please discuss few main differences here.

There are some advantages & disadvantages for both. One of the biggest advantage i am considering is the Seperation of Concern, Unit Test Friendly & More control over what HTML to be rendered (extra love for this).

2) how many type of views are there....i hard about razor view....what it is and how many type of views are there like razor.

There are few out there. Razor, WebFormViewEngine, Brail, Spark etc. Here is a well written comparison of those.

3) razor available from which version. it is there in asp.net mvc version 2.0

razor was introduced in MVC3. It is not there in MVC2.

4) i have installed VS2010 and when i open project then i see only asp.net mvc version 2.0 is available. so tell me what i need to install in my machine as a result asp.net mvc 3.0 & 4.0 will be available.

You need to install MVC 3.0 .Then it will be available in the new Project Dialog.

5) can i use gridview and othere controls of asp.net webform in asp.net mvc project? but i go through few mvc code sample and i saw no body is using asp.net webform's control in mvc .... why. it is not allowed.

There is nothing called a Server control in MVC. In web forms, basically the Grid control will render the markup of an HTML table. But it is difficult for the Developer to make more adjustments/customizatin to the rendered output. But in MVC, you have the full control what to render (you have a seperate VIEW which is only for the UI markup) (you are going to love this thing) . You can write the HTML markup of a table by hand. you can make any kind of customization to that as you wish. If you need, there are lot of jQuery plugins available which you can use to make your HTML table looks more nice and professional. These plugins offer some functionalities like sorting , paging etc...

6) in mvc is there any concept like control event like webform or can we add references of other dll etc.

There is nothing called a Server controll in MVC. You can still invoke some server code by listening to some events (change/Click) of the HTML element using javascript and make a call to an action method which executes some code.

The best way to clear all your doubts and clarification is to Start doing a small MVC project. There are some nice tutorials out there. Goodluck

Community
  • 1
  • 1
Shyju
  • 214,206
  • 104
  • 411
  • 497
  • thanks a lot for ur clarification. when i open a mvc 2 project from VS2010 IDE then i saw still toolbox is there where asp.net webform related controls are there and i tried to drag a textbox control on a aspx file and i saw control dropped there. if server control can not be use there then why IDE is showing server controls on toolbox sliding panel. can u clarify it bit. – Thomas Jul 24 '12 at 14:30