Geeks With Blogs

Steve Clements .Net and then some.... .NET 4.0
Minify JS and CSS in Visual Studio Build Events
It’s pretty widely accepted (and common sense) that if you’re putting a site out into the wild – such a simple task as minifying CSS and JavaScript files can save a bunch of load time, especially on mobile devices. I’ve been playing about with this today and was quite happily using jsmin as described here until I noticed that in IE 7 and IE 8 the minified CSS didn’t work. The problem seems to be when using a background style, it takes out the space between the image url close bracket and the next ......

Posted On Saturday, December 3, 2011 3:52 AM

jQuery Datatable in MVC … extended.
There are a million plugins for jQuery and when a web forms developer like myself works in MVC making use of them is par-for-the-course! MVC is the way now, web forms are but a memory!! Grids / tables are my focus at the moment. I don’t want to get in to righting reems of css and html, but it’s not acceptable to simply dump a table on the screen, functionality like sorting, paging, fixed header and perhaps filtering are expected behaviour. What isn’t always required though is the massive functionality ......

Posted On Saturday, March 5, 2011 3:58 PM

Setting jQuery after AJAX partial post back
OK, so for some reason you have a mega mashup solution with AJAX, jQuery and web forms. Perhaps you are just on the migration from AjaxControlToolkit to the jQuery UI framework – who knows!! Anyway, the problem is that when you post back with something like an UpdatePanel, you will find that your nicely setup jQuery stuff, like the datepicker for example will no longer work. You may have something like this… $(document).ready(function () { $(".date-edit").datepicker({ dateFormat: "dd/mm/yy", ......

Posted On Monday, February 7, 2011 2:26 AM

Using Telerik MVC with your own custom jQuery and or other plug-ins
If you are using MVC it might be worth checking out the telerik controls ( they are free if you are doing an internal or “not for profit” application. If however you do choose to use them, you could come up against a little problem I had. Using the telerik controls with your own custom jQuery. In my case I was using the jQuery UI dialog. It kept throwing an error where I was setting my div to a dialog. Code Snippet $("#textdialog").dialog({ The problem is when ......

Posted On Wednesday, January 5, 2011 3:11 AM

Copyright © Steve Clements | Powered by: