Contents tagged with ASP.NET Web Forms
-
Case Study: Comparing ASP.NET Web Forms and MVC Implementations
Apparently, I am the last ASP.NET Web Forms developer in the whole World, which makes me kind of sad… anyway, after much crying, I decided to try out something: a comparison of Web Forms and MVC to solve a real life problem! Now, I only needed a problem to solve… Then, a colleague of mine came questioning me about captchas, so I thought, why not use it as my example? And here we are!
-
Farewell, ASP.NET Web Forms, We Hardly Knew Ye
ASP.NET Web Forms, the venerable web framework that Microsoft shipped with the .NET framework almost 15 years ago and we all
hatelove, is going away. Yes, it’s official: ASP.NET 5 will not include Web Forms, only MVC 6. ASP.NET 4.6, however, will still include Web Forms, including some updates, but the future appears to be all MVC (and OWIN, for that matter). Having spend a lot of my professional life working with Web Forms, I feel kind of sad. Yes, I do acknowledge event-hell, viewstate-hell, etc, but I find it easy to get around this once you know a thing or two. But what I really like about Web Forms is the reuse capacity that server-side controls offer: just add a reference to an assembly containing controls, register them in Web.config or in the page, and you’re done. A control encapsulates both client and server-side logic, so it is the perfect reusability mechanism for the web, in my opinion, and I wrote tens of posts on it. MVC now offers somewhat similar mechanisms, in the form of view components and tag helpers, but before that, there was really no reuse mechanism – partial views cannot be referenced from an assembly and helper methods cannot be extended. Don’t get me wrong: I like MVC, but I think that Web Forms was complementary. Taking in consideration the extensibility mechanisms offered by MVC, I can imagine that someone will even implement Web Forms on top of it! -
ASP.NET Formatted String Control
Back to ASP.NET Web Forms land! SharePoint includes a handy control, FormattedString, that can be used to render the contents of its child controls as specified in a format string; pretty much what String.Format does. I wanted to do the same with plain old ASP.NET Web Forms, and here’s what I came up with:
-
Defining ASP.NET Update Panel Template Contents Dynamically
The ASP.NET UpdatePanel was introduced with the ASP.NET 2.0 AJAX Extensions almost a century ago (kidding, but almost feels like it!
). It allows us to have AJAX-style effects (partial page loads) with very little effort.
-
ASP.NET Web Forms Extensibility: Model Binding Value Providers
ASP.NET 4.5 introduced model binding: basically, it is a way for databound controls - Repeater, GridView, ListView, etc - to be fed, not from a datasource control - ObjectDataSource, EntityDataSource, SqlDataSource, etc -, but from a method in the page. This method needs to return a collection, and may have parameters. The problem is: how these parameters get their values? The answer is: through a model binding value provider.
-
ASP.NET Web Forms Extensibility: Control Builder Interceptors
After my previous post on Control Builders, what could possibly come next? Of course, Control Builder Interceptors! Not much documentation on this one, which is a shame, because it is an even more powerful feature that was recently introduced in ASP.NET 4.5.
-
ASP.NET Web Forms Extensibility: Control Builders
One of the most often ignored extensibility point in Web Forms is the Control Builder. Control Builders are subclasses of ControlBuilder (or other more specialized, such as FileLevelPageControlBuilder, for pages, or FileLevelMasterPageControlBuilder, for master pages) that can be specified per class. It controls some aspects of a control instance:
-
Generating GDI+ Images for the Web
.NET’s Graphics Device Interface (GDI+) is Microsoft’s .NET wrapper around the native Win32 graphics API. It is used in Windows desktop applications to generate and manipulate images and graphical contexts, like those of Windows controls. It works through a set of operations like DrawString, DrawRectangle, etc, exposed by a Graphics instance, representing a graphical context and it is well known by advanced component developers. Alas, it is rarely used in web applications, because these mainly consist of HTML, but it is possible to use them. Let’s see how.
-
Speech Recognition in ASP.NET
Speech synthesis and recognition were both introduced in .NET 3.0. They both live in System.Speech.dll. In the past, I already talked about speech synthesis in the context of ASP.NET Web Form applications, this time, I’m going to talk about speech recognition.
-
ASP.NET NHibernateDataSource
A long, long time ago, I wrote a NHibernateDataSource control. Back then, it was based in the first LINQ provider for NHibernate, and a long has happened since. Now, I decided to give it another go!