web 2.0

Looking for an MVC Grid Control? Try MVC Contrib!

Like most .NET Web Developers I was ecstatic when MVC was released. To put it plainly, I hate WebForms. However I do find myself missing some of the great WebForm controls like the DataGridView. The DataGridView was present in every WebForm application that I wrote. I really appreciated all the subtle bells and whistles that Microsoft added to the grid over the years. I wrote my own grid control for classic ASP and I know firsthand that it is a significant undertaking to make a grid control that if feature rich and flexible enough to handle complex situations. Therefore I was not crazy about taking on the task again… Initially, I adopted jqGrid as my new de facto grid control. From a end user’s perspective, jqGrid provides a top-notch user experience. Unfortunately, the control is heavily dependent on JavaScript so its not always the best solution for Mobile websites. In addition, jqGrid does require a fair amount of plumbing. Although it’s not difficult to implemen... [More]

Tags: ,

ASPNet | dotNet | MVC

Error Handling in MVC with ELMAH

What is ELMAH? In case you have been living under a rock I will start this block post by giving you a basic introduction to ELMAH. If you already are familiar with ELMAH then just skip to the next section. The following description was taken verbatim from the ELMAH website… ELMAH (Error Logging Modules and Handlers) is an application-wide error logging facility that is completely pluggable. It can be dynamically added to a running ASP.NET web application, or even all ASP.NET web applications on a machine, without any need for re-compilation or re-deployment. Once ELMAH has been dropped into a running web application and configured appropriately, you get the following facilities without changing a single line of your code: Logging of nearly all unhandled exceptions. A web page to remotely view the entire log of recoded exceptions. A web page to remotely view the full details of any one logged exception. In many cases, you can review the original yellow screen of deat... [More]

Advice for Aspiring ASP.NET Web Developers

For some reason, I have been asked the same question a lot lately. Which is, "I am new to development. Do you have any tips/tricks/suggestions to get me up to date on ASP.NET?". My knee jerk response to this question is usually to point people to Google for the answers. However, there is so much information floating around on the web these days that it can be overwhelming when you try to comb through it all. So, if you are an aspiring ASP.NET web developer then I hope you will find the following links, tips and tricks useful. The Basics of Web Development No matter what web technology you develop with, there are some basics that you should understand first: HTML – If you have never had exposure to HTML then you are going to want to visit W3 schools tutorial page before going any further. In its most primitive form, HTML is very simple and easy to use. Cascading Style Sheets (CSS) is a style sheet language used to describe the presentation semantics (that is, the look and form... [More]

Open Data Protocol AKA OData

I have been hearing the term OData a lot lately but I had no idea what it really was. So I did a little searching and stumbled upon odata.org. OData or the Open Data Protocol is a new format for sharing data on the web using REST (Representational State Transfer). The text book definition of OData from the website is as follows: The Open Data Protocol (OData) is an open protocol for sharing data. It provides a way to break down data silos and increase the shared value of data by creating an ecosystem in which data consumers can interoperate with data producers in a way that is far more powerful than currently possible, enabling more applications to make sense of a broader set of data. Every producer and consumer of data that participates in this ecosystem increases its overall value. At the heart, OData is really just producing an ATOM or JSON payload. Since ATOM and JSON are universally known, OData is not tied in any way directly to the .NET family of languages. OData already has ... [More]

Goodbye Http Handler, Hello FileResult

If you have been developing applications in ASP.NET MVC then you are probably familiar with the ActionResult class. The ActionResult is the most common type of object returned from an action. When building MVC apps, most of time you will use the ActionResult class. Last week while I was working on my open source project WeBlog, I built an HTTP Handler to serve up images. I started using an HTTP Handler for images because I needed a mechanism to prevent bandwidth leeching. The only bad thing about using an HTTP handler for images is that you end up with some pretty ugly URLS. In my case the URL ended up looking like this: /Image.axd?image=sample.png Luckily, my friend Ron noticed my new HTTP Handler and mentioned that I could have accomplished the same thing with a controller action that returned a FileResult instead. After a bit of investigation, I realized that Ron was absolutely right. I deleted my HTTP Handler and replaced it with this code, which was added to the Home Controlle... [More]