Real-World Inversion of Control and Dependency Injection with WebForms (This Is Not a Drill)

Posted by: AspNetResources.com articles, news and updates, on 24 Jan 2014 | View original | Bookmarked: 0 time(s)

An exercise in refactoring a real-world WebForm to a more maintainable and testable one.Suppose we have a Contact Us page. Old school, with all the logic in code-behind. I borrowed it from an old project, but I’ve written plenty of those myself over the years, and I’m sure so have you. public partial class Contact1 : Page { private void SubmitFeedback (object sender, EventArgs e) { if (!Page.IsValid)s return; string subject; string to, from; MailMessage message; StringBuilder...

Category: Refactor | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 588 | Hits: 13

Similar Posts

  • CodeDigest.Com Article,Codes,FAQs - April,2009 more
  • WPF Presence Controls for Office Communicator 2007 more
  • WPF: Read-only Dependency Properties more
  • Delegating Decorators more
  • Silverlight 2 Beta 1 Controls Available, including Source and Unit Tests more
  • ASP.Net Framework - Create your own RouteHandler more
  • ASP.Net MVC Framework - Create your own IControllerFactory and use Spring.Net more
  • How to Add Properties to Custom WPF Control more
  • Look Mom - No Hands more
  • Custom Controls in ASP.NET (Part 1) more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD