Ben Griswold on June 12th, 2010

The MVCContrib Grid allows for the easy construction of HTML tables for displaying data from a collection of Model objects. I add this component to all of my ASP.NET MVC projects.  If you aren’t familiar with what the grid has to offer, it’s worth the looking into. What you may notice in the busy example [...]

Continue reading about Render MVCContrib Grid with No Header Row

It doesn’t take much to hack together email functionality using the .NET framework.  In most cases you can new-up a MailMessage reference, assign sender and recipient addresses, provide a subject and a message body, configure your SMTP settings and then send.  Done and done. But let’s say you need to provide both plain text and [...]

Continue reading about .NET MailMessage, LinkedResources, AlternateViews and Exceptions

Ben Griswold on February 25th, 2009

I think everyone is familiar with those short urls which are being passed around in applications like Twitter.  It’s pretty neat that there are dozens of services willing to shorten urls for us, but what about lengthening them?  That’s where longurlplease.com comes in.  As they say, they promote safer and productive browsing by lengthening short [...]

Continue reading about Expand Urls with C# and LongUrlPlease

Ben Griswold on February 18th, 2009

ClickOnce is pretty simple to get going once you know where to click (no pun intended.)  Here’s a down and dirty, quick start guide on how to implement ClickOnce in your application: First, create a sample application in Visual Studio.  The attached sample is a WPF application using VS 2008.  ClickOnce configuration is managed through [...]

Continue reading about ClickOnce Getting Started Sample

Ben Griswold on January 16th, 2009

I’ve been spending lots of time getting my head around Aspect-Oriented Programming (AOP). At its foundation, AOP separates crosscutting concerns (concerns which are not localizable and cannot be implemented successfully using pure imperative or object-oriented programming) into loosely coupled, modularized units called aspects and injects them into the otherwise one-dimensional base program.  Without AOP, we [...]

Continue reading about Caching with C#, AOP and PostSharp

Ben Griswold on December 18th, 2008

jTemplates is a jQuery plugin and template engine for Javascript.  If you keep up with Dave Ward and/or Rick Strahl you may already be familiar with jTemplates as they have both highlighted the plugin on their respective bolgs.  About 1.5 months ago, however, I got into the action and started using jTemplates in conjunction with [...]

Continue reading about jTemplates with jQuery, AJAX and Json

Ben Griswold on December 16th, 2008

As javascript libraries, particularly jQuery, increase in popularity so do web techniques using AJAX and JSON. Have you ever seen this code?  It is front and back of an ASPX file with the single responsibility to return JSON data per an AJAX request. GetDataPage.aspx <%@ Page Language=”C#” AutoEventWireup=”true” CodeFile=”GetDataPage.aspx.cs” Inherits=”GetDataPage” %> <%– This minimal code [...]

Continue reading about HTTPHandler with JSON Data

Ben Griswold on December 12th, 2008

The Cache Helper Class has been updated so that it is no longer limited by the generic constraint.  The original post has been updated along with a sample project for download.  Let me know what think.  I know I’m much happy with this solution.  As always, thanks for your comments and thanks for letting me [...]

Continue reading about C# Cache Helper Class Revisited