Archive for March 2014

Google had changed their policy for fetching profile image
New way to fetch google+ profile image
Google have recently decided to change the way you can fetch profile image. Good old building of image URL is not supported anymore after Google has applied security policy. In good old, but unfortunately deprecated approach you only needed profile id to build a URL for fetching Google+ profile image like the following: ... read more
Umbraco backend customization - handling events
Hook on umbraco events and control them from your code
In Umbraco 6 new interface IApplicationHandler is introduced. By inheriting this interface in your class you can hook your custom methods to handle events which occur in Umbraco. The following two I use really often for controlling Umbraco behavior: ... read more
Umbraco backend customization - custom buttons
Add you custom buttons to umbraco toolbar and extend CMS
This article is about extending Umbraco back-end with custom button to which you can attach your custom click handlers and force Umbraco back-end to work according to your needs. ... read more
Easy data visualization with Google Graphs API
Free and easy way to display data on website
Google graph are really easy to use on website for the main reason that you do not need to maintain code and because it is free for use. Samples and documentation can be found at read more
Dynamic JQuery plugin files load
Improve page load when using multiple JQuery plugins
You all probably had to deal with certain js files for JQuery plug-in. Usually developers add reference to a js file in Master page (if using WebForms) on layout view (is using MVC). This practice is not so bad, because you have references maintained in one file, but bad thing is that all js file are being load even if none of then are used on the particular pages. ... read more
Handling ajax request in WebForms
Elegant way to do AJAX in WebForms
In case you want to add JQuery Ajax calls to your page, you would basically need to add one more page which will be invoked with Ajax call. In order to reduce number of physical pages you can reuse the same page, but make it act differently for normal GET/POST HTTP request and totally different for Ajax GET/POST HTTP request... read more
Detect ajax request in C#
Easier way to detect whether request is an ajax request
Sometime you need to determine whether your request is standard GET/POST request or Ajax POST/GET http request. This info is stored in request value isAjax or X-Requested-With. By checking these values of request you can easily determine whether http request is ajax or not. ... read more
Extending Umbraco API with extension methods
Nullreference exception safe property accessing
Often during writing partial view for page you need to read value from property which is content or media picker. In order to get integer value you need to cast value acquired with GetPropertyValue method which is object type... read more