This tip comes to you from my blog, but the hat-tip goes to Andres Nelson whom I work with at my current client who actually showed me how to do this. The Scenario You have a grid with multiple fields. These fields are dependent upon each other. If one field is empty, then the other…
Continue Reading »
A couple of days ago I threw out a poll on twitter to see what people thought of a particular question I had in mind. Here it is: What I’m after is pretty simple … how should one handle exceptional cases in Web Api development. Namily JSON and XML. My take on it is pretty…
Continue Reading »
Sometimes your task in MVC involves many buttons in the same form. Such as the screen shot here. What happens in most situations is that you end up having some code that kind of looks like this: … and then the code looks like this We can solve this with a little jQuery. By attaching…
Continue Reading »
Certain parts of ASP.NET MVC can be a real pain to test. Namely Model Binders, Action Filters and anything that relies on some magic “Context” that seems to derive from HttpContext, ControllerContext, RequestContext, etc. Below, I’ve outlined how I’ve unit tested a Action Filter. You could extrapolate some of this code into a base Test…
Continue Reading »
Written on
April 20, 2010 by
Donn in
MVC
If you disable your “save” button on your MVC views when the page first loads and want them to be auto-enabled when any input on the form changes, you can do that with the following jQuery snippet. This is sort of a hack*, but it works. With this HTML and this javascript: You’ll “enable” the…
Continue Reading »