Skip to content

What is the difference between a aspx webform, and a razor form?

Olivier Muhring

Olivier Muhring

Asked Jun 18, 2012, 5:53 AM EDT2 answers
Share
LinkedInX
I've only recently begon to develop in ASP .NET MVC 3.

On the project I'm currently working on I started to work on a couple of screens. To create a view Visual Studio 2010 offers 2 options: either in classical aspx, or in razor webforms.

Most articles, or booksections I read about mvc seem to have a preference for razor webforms, and consider aspx to be a "only if you really have to" option.

Basing myself on what I read, I started working on a couple of screens, using razor webforms. My colleague on the project however chose to develop her screens in aspx. To stay on the same track I've started reworking all my screens in aspx.

Strangely enough... the same code executed with a razor webform executes flawlessly, while when I switched to aspx, it suddenly generated an error. Now, don't get me wrong.. it was a valid error, but I wonder... why didn't the error show up whilst I was working in razor?

Which brings me to my actual question: what is the actual difference between the 2? And when do we use what, or is it just - as it appeared to be in the articles - a personal choice?

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • Suthish Nair
    0
     
     Both were written on different view engines..

     refer blog
    0
  • Olivier Muhring
    0
    Thank you for the link.

    But is there a rule of thumb for their usage?
    0