|
Rethinking the Switch Stataement with...A Dictionary?
by
Mike Gold
On
Oct 11, 2009
Sometimes its better to refactor an ugly switch statment into a more flexible pattern. The command dispatch pattern is such a pattern. Originally implemented using OO and polymorphism, the functional constructs gives you a cleaner solution.
|
|
|
|
|
Reversing a Dictionary in LINQ and C#
by
Mike Gold
On
Oct 06, 2009
Every once in a while you are posed with an interesting puzzle. Someone needed a dictionary reversed and this sounded just like the thing I would enjoy tackling with LINQ.
|
|
|
|
|
|
|
|
|
Extending JQuery
by
Mike Gold
On
Jun 24, 2009
You can extend the jquery object yourself with the extend method and then use those methods you created as if it were any other jquery object.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Cache Busting in your JQuery ajax calls
by
Mike Gold
On
May 17, 2009
One of the problems I've run into in designing websites is that the URL of the websites are cached by the browser and this causes the information in the page to remain stale. In order to force the web page to refresh, you need to trick the browser. Here is how.
|
|
|
|
|
Using JQuery to Manipulate the DOM in your Browser
by
Mike Gold
On
May 14, 2009
JQuery is a powerful tool for doing awesome tricks in the browser. Through JQuery, you can change the look of your page on the fly, add animation, client side graphics and controls, and perform Ajax calls back and forth to the server. This blog talks about using JQuery to do manipulation of items on your browser page dynamically.
|
|
|
|
|
My thoughts on moving to ASP.NET MVC
by
Mike Gold
On
May 05, 2009
The MVC framework has recently been released, and brings great advantages to designing scalable web application for the developer. Here are some of my initial thoughts on the framework vs classic ASP.NET.
|
|
|
|
|
|
|
|
|
Using MVCContrib Grid in a Web 2.0 World with jquery and AJAX
by
Mike Gold
On
Nov 07, 2008
In a web 2.0 world it is not enough to keep posting the entire page back rendered to the browser. Otherwise the whole screen blinks and it looks web 1.0 ish. The following blog describes a strategy of how you can create your own "components" and populate them on a part of the page through the controller.
|
|
|
|
|
|
|
|
|
|
|
|
|
How to use the FilterExpression in your GridView
by
Mike Gold
On
Sep 19, 2008
FilterExpression is a property of the SqlDataSource that allows you to filter data in the GridView quickly. Unfortunatley it doesn't maintain its value very well on post backs. The code below will show you how to remedy this problem
|
|
|
|
|
|
|
|
|
How To Make Sure the Silverlight App Gets Keyboard focus
by
Mike Gold
On
Sep 02, 2008
After playing with silverlight for a while, I found that the Focus method did not work very well to give the silverlight app focus for keyboard input. You can use a trick in javascript to make sure that the silverlight control has focus to begin with. Then later use the Focus method inside your XAML code behind.
|
|
|
|
|
How To: Speeding up adding nodes to a Treeview
by
Mike Gold
On
Aug 06, 2008
Not sure if others have experienced this, but if you try to add a lot of nodes to a treeview, the program will progessively slow down with the addition of each node. Here is how to solve the problem.
|
|
|
|
|
|
|
|
|
Doing OO in F# : Defining an F# Class
by
Mike Gold
On
Jun 08, 2008
Although very much a functional language, F# provides us with object-oriented mechanisms such as classes, inheritance, and encapsulation. The sample below illustrates all three
|
|
|
|
|
Problem with DataBinding and Custom Formatters
by
Mike Gold
On
Jun 05, 2008
Has anyone else been able to get this to work properly? It seems the only way is to implement custom formatting in a databound control is to use the Format event. Here is my sample code and how to overcome the problem.
|
|
|
|
|
|
|
|
|
|