Jonas Stawski

Everything .NET and More

Join Me at dotNetMiami

Tomorrow, December 10th, 2013, I will be presenting at the dotNetMiami user group about building Real Life Single Page Applications. I will talk about how to build these apps for real world scenarios, no demo BS . Come join me and find out about bui... [More]

MVC Unobtrusive Validation with Twitter Bootstrap

ASP.NET MVC has great built-in support for client and server side validation. On the client side it uses jQuery Validation plugin with a custom client side library which parses the form’s elements and automatically creates validation rules from... [More]

HttpContextBase and Dependency Injection

I was just hunt down by a minor bug in my code and couldn’t figure out what was happening. I’m using Dependency Injection to inject the HttpContextBase into a service call so I can more easily unit test it. So I was setting it up like this: ... [More]

ASP.NET MVC3 change validation class

If you are using the ASP.net MVC3 built in validation such as 1: @Html.ValidationMessageFor(m => m.Username) you can easily change the validation by overriding the CSS class field-validation-error like this: ... [More]

Dynamic CSS with ASP.NET MVC and ContentResult

The ContentResult class is of type ActionResult, which means it is used to return text content from Controller Actions. There are multiple uses for the ContentResult, and one use is to create CSS dynamically. One would simply point a style sheet to a... [More]