My musings about .NET and what not

10 Reasons ASP.NET Webforms (Still) Rock

With ASP.NET MVC being the new hotness, some just can't resist the urge to proclaim that, all of a sudden, Webforms Suck. Well, some of us have been making a living on Webforms for years, and despite proclamations to the contrary, Webforms are still useful and are here to stay.


With the dizzying array of new technologies being embraced by Microsoft lately, we're seeing it a lot more frequently. Hello LINQ to SQL, ADO.NET sucks! Hello Entity Framework, LINQ to SQL sucks! Hello jQuery, AJAX sucks! And now, hello ASP.NET MVC, Webforms suck!

You've seen it before. It's the classic "boy-meets-new-girl, boy-dumps-old-girl, boy-disses-old-girl-all-over-town" story. If this was 1985, John Hughes would probably be making a movie about it.

Make no mistake, there are lots of reasons to love MVC. Lean, mean HTML. Clear separation of concerns. Support for multiple view engines. RESTful UI. Cute URLs. Unit testing. But does all this MVC goodness mean that Webforms Now Suck? Not by a longshot, pal. With apologies to my friend JD Conley, here are 10 reasons that Webforms should and will remain relevant for a long time to come.

Webforms are a mature technology. There's a lot to be said for this. The Webforms paradigm has been around since 2002 - a generation in Web years. Webforms are tested, tried, and true. Millions of applications have been built on Webforms, and along with that, a vast human knowledge base has developed. This is an invaluable resource that you can tap into whenever you need it. There's no problem in Webforms that hasn't been solved countless times in countless ways before. You just have to know how to look, where to look, and whom to ask. Trust me, the answer is out there.

Webforms are great for RAD development. When you need to develop a quick prototype or proof-of-concept for a client, Webforms are tough to beat. Can you name another technology that actually lets you see your data on the page in under 30 seconds? Or that lets you flesh out a complete, working, data-driven web application in under 30 minutes? More productivity in less time means I get paid. And I really like getting paid.

Tons of third-party controls. With Webforms, there is almost never a reason to reinvent the wheel. There are thousands of third party controls and UI libraries developed by Microsoft and others. Many of them are free. Others are available at very reasonable cost.

WYSIWYG support in Visual Studio. I understand that once you surpass the intermediate level as a developer, you'll probably be working in Source View most of the time; but for RAD development (see above) or for those new to development, the ease-of-use of Visual Studio's Design View cannot be overestimated.

Support for Dynamic Data. Webforms support Dynamic data, MVC doesn't. Dynamic Data is way, way cool. If you don't believe me, check out this recent Scott Hanselman post.

Support for App_Theme. If you are into working with ASP.NET Themes, swapping out Master pages on the fly, and doing a lot of other server-side dynamic UI stuff, Webforms offers better support. This is one reason I don't hear mentioned very often.

Webforms are Newbie-Friendly. MVC, by it's nature, lets you design "closer to the metal," exerting fine-grained control over HTML rendering. This is one of the things that I really dig about MVC. But lets face it - unless you have a thorough understanding of XHTML, CSS, JavaScript, the DOM, and are equipped to tackle issues like web standards, accessibility, and cross-browser rendering, you aren't going to get very far with MVC.

Webforms, on the other hand, give you the option of abstracting HTML rendering to the ASP.NET runtime. Heck, it even takes care of cross-browser and downlevel browser issues behind the scenes. This is a boon to developers new to the Web, who might not have a strong grasp of HTML. It's like ASP.NET is one big party, and everyone's invited. This is web development for the masses - noobs included - and I say, the more developers who adopt ASP.NET technology, the better for everyone.

Webforms provide options. Note that I said above that Webforms give you the option. No one is forcing you to use <asp:HyperLink> instead of <a></a> or <asp:Label> instead of <span> if you don't want to. No one is forcing you to use CSS classes instead of ID selectors if you don't want to. No one is forcing you to use the AJAX framework instead of writing your own callbacks if you don't want to. Webforms still allow you to retain a good deal of control over your page in cases where you need it, and hand off to server controls when that's more convenient.

The ViewState/Postback model. This is one aspect of Webforms that MVC fanboys slam particularly hard; but the fact is Webforms just plain makes it easier to preserve state, period. Of course, whether you consider the Webforms state model and form postbacks as a "weakness" or a "strength" probably depends on your background. As a heavily OOP-oriented guy, the event-driven model feels natural to me. And personally, I like the idea of letting the runtime handle the state of my server controls automagically.

It is true that ViewState can get out of hand pretty easily if you either a) aren't paying attention, or b) don't understand the purpose of ViewState or how to control it. If you don't need to post the form, turn your ViewState off! (For that matter, if you don't need to post the form, why are you using a form?) If you are cross-posting the form to another page, turn ViewState off! If you are posting the form back to itself but don't need to retain page or server control values, turn ViewState off! Of course, you can always compress the ViewState that remains. And if you really hate ViewState, modify your code so that it works without it - for example, rebind data-bound controls manually. Remember, ViewState can be disabled for a single control, a whole page, or even for an entire application.

Webforms will continue to evolve. Microsoft is still committed to Webforms, and a lot of new and exciting things are being planned for the next version of the ASP.NET framework. Among those already announced are the ability to control ClientIDs for nested server controls, support for URL routing, much-improved ViewState management, and many improvements to existing server controls, including standards-compliant, CSS-friendly HTML out of the box (finally, goodbye and good riddance to those dreaded CSS Friendly control adapters).


Look, it's one thing to get jazzed by a new technology like ASP.NET MVC. I certainly am. I feel it's pretty safe to say that I will be doing a lot less in Webforms a year from now than I'm doing today, and if you're reading this, that probably holds true for you as well. But to proclaim that everything that came before now "sucks" is just plain ridiculous. Each model has important strengths that make more sense for solving certain problems. For some developers, in certain scenarios, MVC will be the better choice. For others, Webforms will be the better choice. And in some cases, many will find combining the two makes the most sense (you can still use Webforms with MVC, you know).

I, for one, plan to keep Webforms securely stowed in my back pocket. Webforms still have a lot of good things going for them, and that's why they're not going anywhere.

Sure, everyone wants to dance with the New Girl at the party. But sometimes, it's better to go home with the one that brung ya.

Subscribe to this blog for more cool content like this!

Tweet this blog post

kick it on DotNetKicks.com

shout it on DotNetShoutOut.com

vote it on WebDevVote.com

Bookmark / Share

    » Similar Posts

    1. Balsamiq – It’s Not Just For Salad Anymore
    2. Open Source or Die – The *Real* Future of Graffiti?
    3. I'm a .NET Developer, and Yes, I Love My iPhone.

    » Trackbacks & Pingbacks

    1. You've been kicked (a good thing) - Trackback from DotNetKicks.com

      10 Reasons ASP.NET Webforms (Still) Rock — January 16, 2009 1:54 PM
    2. ASP.NET MVC sucks and so does jQuery and PHP

      ASP.NET MVC sucks and so does jQuery and PHP — January 17, 2009 12:46 AM
    3. Pingback from ASP.NET MVC Archived Blog Posts, Page 1

      ASP.NET MVC Archived Blog Posts, Page 1 — January 18, 2009 9:40 PM
    4. Thank you for submitting this cool story - Trackback from DotNetShoutout

      10 Reasons ASP.NET Webforms (Still) Rock — February 20, 2009 9:56 AM
    Trackback link for this post:
    http://leedumond.com/trackback.ashx?id=40

    » Comments

    1. pcdinh avatar

      > Webforms are great for RAD development

      . This is one of the things that I really dig about MVC.

      > But lets face it - unless you have a thorough

      > understanding of XHTML, CSS, JavaScript, the DOM,

      Do you mean that ASP.NET Web Form is a technology for those who don't know HTML, CSS, HTTP headers but they know how to drag and drop to build extremely inefficient web pages. If so ASP.NET Web Forms community is too dumb

      > WYSIWYG support in Visual Studio

      I don't think you are a web developer. Web page does not work that way. Browser compatibility is a truly nightmare because Microsoft has produced the worst browser in the Internet history. It is funny that you still rely on VS.NET to create web pages

      pcdinh — January 16, 2009 3:51 PM
    2. Lee Dumond avatar

      @pcdinh:

      >> If so ASP.NET Web Forms community is too dumb

      Wow, you really missed the point about being "newbie-friendly", didn't you?

      >> Web page does not work that way. Browser compatibility is a truly nightmare because Microsoft has produced the worst browser in the Internet history.

      And what does this have to do with WYSIWYG support exactly?

      >> It is funny that you still rely on VS.NET to create web pages

      Not sure where you got that idea. I'm an Expression Web man mostly, but thanks for asking.

      By the way, a quick Google search tell me you're a PHP developer, so I'm not surprised most of this went straight over your head.

      Lee Dumond — January 16, 2009 4:32 PM
    3. JD Conley avatar

      Good one. My favorite of the rebuttals so far.

      JD Conley — January 16, 2009 10:58 PM
    4. Lee Dumond avatar

      Thanks JD!

      Lee Dumond — January 17, 2009 11:33 AM
    5. Jef Claes avatar

      Very (!) nice post.

      Jef Claes — January 17, 2009 1:22 PM
    6. Corey Gaudin avatar

      Support for Dynamic Data. Webforms support Dynamic data, MVC doesn't.

      This is not actually a true statement. The latest version on CodePlex supports MVC and is quite easy and powerful to use.

      However, given everything else, I agree that Webforms is here to stay, as it has a MUCH MORE mature Control Model scheme than MVC (since it is not as abstracted in terms of having to utilize HTML/Javascript to accomplish the same task).

      However, do not let that from utilizing both. I typically now create a ASP.NET MVC application and utilize it where it has its strengths (Separation of Concerns, Testability, Abstraction, De-Coupled Logic, etc) and utilize Webforms for pages where Control Specific functionality is required (and there is abundance of controls for Webforms).

      Corey Gaudin — January 21, 2009 12:56 PM
    7. Lee Dumond avatar

      @Corey: Thanks for the heads-up on DD with MVC. I was aware that was being planned, but I haven't kept with the latest framework changes as much as I would like to...

      Lee Dumond — January 21, 2009 1:25 PM
    8. Ryan avatar

      ASP.Net + web forms = nightmare... not a chance otherwise.

      ASP.Net + no controls + shared/organized methods = awesome

      K.I.S.S. ...

      Ryan — January 22, 2009 3:44 PM
    9. Philthy avatar

      Great post, couldn't agree more. I am a little overwhelmed by all the new stuff coming out (give it a rest MS) :-) I really want to learn asp.net MVC, but I'm gonna stick to web forms for the time being. I still have a lot to learn. The only thing that really bothers me is the lack of standards compliant code, rendered by the controls, but it seems like MS is on top of that, and a lot will be fixed in .NET 4.0. Once that is fixed, I see a bright future for webforms.

      Philthy — January 30, 2009 8:13 AM
    10. steve avatar

      you seem to recommend switching off the facilities that make it asp.net - rather like the advice to switch off everything that made vista vista.

      the bottom line is that the abstraction introduced in asp.net was never needed in the first place.

      my 2 main sites earn £2.8M gross. I never saw the need to leave classic asp

      steve — March 14, 2009 5:55 AM

    » Leave a Comment