Month: May 2009

ASP.NET MVC HtmlHelper for Uploadify, Take One

As I’ve mentioned before, I really, really hate the way most people seem to be creating reusable UI “controls” with ASP.NET MVC.  I do not like emitting JavaScript, HTML, etc. from within C# code.  It’s cumbersome to create, difficult to really test, and just a real PITA in general. Based on feedback I received from…

Read MoreView 7 Comments

Using Flash with ASP.NET MVC and Authentication

There is a well-known bug in Flash that causes it to completely ignore the browser’s session state when it makes a request.  Instead, it either pulls cookies from Internet Explorer or just starts a new session with no cookies.  GOOD CALL, ADOBE.  And when I say this bug is well-known, I mean it was reported…

Read MoreView 1 Comment

Testing SyntaxHighlighter

This is a test post to see how SyntaxHighlighter works with Windows Live Writer.  I’m using the PreCode plug-in. So, C#: public class Testing { public Id { get; private set; } public void Method(string parameter) { Console.WriteLine("Testing!"); } } And JavaScript: function(x,y) { alert(‘X is:’ + x + " and Y is: " +…

Read More

“Hi, we’re Square Enix, and we are totally LAME!”

This isn’t directly development-related, but it is noteworthy.  On May 8th, Square Enix, makers of Final Fantasy, Chrono Trigger, etc, hit Chrono Compendium with a cease-and-desist related to ROM hacking and modifications, particularly as it relates to the Crimson Echoes fan project.  Square Enix has sent C&D projects in the Chrono community before, but they…

Read More

Correctly referencing jqGrid in ASP.NET MVC

Show of hands, how many of you are using jqGrid?  Alright, now how many of you have tried to run your ASP.NET MVC application in a configuration where the root of the application isn’t “/”? Alright, now raise your hand if you are having to edit jquery.jqGrid.js when you move the application to the alternate…

Read MoreView 2 Comments

Introduction to Lucene.NET

This is the obligatory “introduction to something that I’m going to be talking about periodically” post.  I think a lot of developers (myself included until recently) are not familiar with Lucene/Lucene.NET and where it fits in their development toolbox.  By the end of this post, you should understand the basics of Lucene, and you will…

Read More

Simplified unit testing for ASP.NET MVC JsonResult

There are quite a few examples floating around on the web that describe how to test your JsonResult objects to make sure the data was correctly packaged.  They all follow the same basic pattern: mock out core ASP.NET objects (such as ControllerContext, HttpResponse, and HttpContext), call JsonResult.ExecuteResult, recover what was written to HttpResponse.Output, and deserialize…

Read More

Prevent users from abandoning changes accidentally with jqGrid

In the project I’m working on, we use jqGrid to display hierarchical records in an Excel-like manner.  Changes are queued up on the client and submitted to the server whenever the user clicks the “Save” button.   That means a user could make a bunch of changes, then navigate away from the page accidentally, and lose…

Read MoreView 6 Comments

Link Roundup for May 6, 2009

Windows 7 RC Publicly Available The release candidate has arrived!  And it’s valid until March 1st!  The beta, however, begins shutting down on June 1st (less than a month for those who can’t read the title of this blog post).  If you’re running beta, get it.  Upgrading from beta to RC is described here, but…

Read More

Things I hate…

The use of metadata classes: 1: [MetadataClass(typeof(MyMetadataClass))] 2: public partial class MyClass 3: { 4: public int MyProperty { get; set; } 5: } 6:  7: public class MyMetadataClass 8: { 9: [Range(1,100)] 10: public int MyProperty{ get; set; } 11: } [Credit goes to Mike’s post for inspiring this bit of hatred; I’m not…

Read More