web forms vs MVC in .NET

As a developer, what is the difference between creating/developing ASP.NET site vs ASP.NET MVC ?

or in other words what aspects are different?
novice programmerAsked:
Who is Participating?
Rajar AhmedConsultantCommented:

There are several resources available online to know the differences between them.

Here are some of them mentioned based on my experience :

ASP.Net is a code behind approach where control actions are event based which is sort of window application. If you have knowledge of windows form then you will enjoy working in ASP.Net. Behind the scenes event based are controlled by viewstate mechanism.Some key terms in Asp.Net are page life cycle,database controls like grid view,pagelist,etc,View state. IMO ASP.Net is quite simple for beginners.

MVC is the structured pattern where you will not see any code behind the concept and every control action are purely based on web standard like get, post, etc. Apart from HTML helpers control you will not see any database control like gridview, pagelist here. Some key terms here are Model binding, Routing,view engine like Razor. Also MVC is built on top of ASP.NET framework.  

Nitin SontakkeDeveloperCommented:
I think pretty much everything is different. No point in replicating everything here so just posting a hyperlink:


To my knowledge some part of ASP.NET is also open source, contrary to what is mentioned in the post above.

One very important note, in case you are not aware. MVC is an application development design pattern. Microsoft has nothing do with it. ASP.NET MVC is Microsoft's implementation of that design pattern. Many languages have this implementation. Some people often land up thinking that either Microsoft invented it or is exclusive to Microsoft. Both is incorrect.
novice programmerAuthor Commented:
@Nitin and @Rajar - thanks

what about postback, I read ASP.NET has postback and ASP.NET MVC does not?
Rajar AhmedConsultantCommented:

As i mentioned earlier about the event based programming in asp.net whenever you trigger the server control event the enitre form would be posted to the server.By using ispostback boolean you will determine whether its postback request or not.

As MVC is not event based application it does not require postback feature.Here major advantage, the website will post only the required values and not necessarily post the entire web page.

As i said asp.net webforms made our life so easy that we would  believe that controls values can be retrieved in the server side code like textbox1.text,label1.text,etc but the fact is that is not at all possible in pure web standards as like MVC.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.