• Today

    Today is a very important day. Today, I am officially a New Zealand citizen. Today, I join my brother and dearly departed mother in bearing the rights and responsibilities of being a kiwi. In doing so, have relinquished my Malaysian citizenship - and being a very difficult country to ever earn one from, I do so not lightly. But though Malaysia is where I was born, it is here that I live; it is … more

  • Pro-Tip: Fixing Postback Issues on Default / Home pages in Kentico

    I recently came across a weird issue where on a specific page, search functionality wasn't working (but was fine on all other pages) - when the search buttons were pressed, the page would just reload as if nothing happened. If this is happening to you, it might be a web.config / IIS7 configuration issue related to the default root for a site; a good way to test this is to check if closing preview … more

  • Retrieving Contact Information In WP7.1 (Async/Sync Goodness)

    Over the last few days I've come up with another application that I'd love to make, and a small part of it involves retrieving contact details. As part of the Mango update, one of the new APIs provided by Microsoft is the contacts API, falling under the Microsoft.Phone.UserData namespace. This is awesome, except that because the contact search method is only provided asynchronously, I was having … more

  • Using the DefaultButton property on asp:Panel controls with LinkButtons

    When building a site, if you've got multiple input forms and buttons (such as a global search in a header and a contact us form as part of the page content), hitting the enter button on any part of the form normally defaults to submitting the very first form on the page (in the example, the search in the header). To get around this, all you need to do is set the DefaultButton property on a asp: … more

  • Custom Web Fonts: IE8 and Different Font Weights

    If you'll remember a few posts back, I described how to import custom fonts for different weights. It turns out that this works for most browsers except IE8 (and probably 7, and 6, and so on). The original css to do the import was: @font-face{ font-family: 'MyFont'; src: url('fonts/MyFontFile.eot'); src: url('fonts/MyFontFile.eot?#iefix') format('embedded-opentype'), url(' … more

  • When Google Employees Flip

    [Well, okay, he didn't flip - but this was never meant to be public. You can, ironically, find a really really interesting worthwhile read related to a lot of things about the IT/tech/web sector on Google+ here. I don't know how long it'll stay public though, so here's my two favourite quotes: "It's not even super clear whose mom he was talking about, and doesn't really matter, because nobody's … more

  • Custom Search Refiners in SP2010 Gotcha

    I thought I'd blogged about this previously, but it turns out I haven't. So a colleague of mine ran into this issue where when you are setting the Filter Category Definition XML on the web part, after you save all the values reset, preventing you from customizing the refiners panel. If this is happening to you, make sure you uncheck the "Use default configuration" setting, or it won't persist … more

  • Custom Fonts For Your Website - Bold, Italics and IIS

    While it's still not really 100% universally supported, with a combination of .eot (IE), .svg (Safari/Chrome/Opera) and .woff (FF), you can get your website rendering a custom font for most people on most browsers. The css is pretty simple: @font-face{ font-family: 'MyFont'; src: url('fonts/MyFontFile.eot'); src: url('fonts/MyFontFile.eot?#iefix') format('embedded-opentype'), … more

  • WP7 Mango Rolling Out

    Although since I've been on the developer beta for a while, it doesn't really feel all that different - it's nice to have the official bits though, and I'm sure everyone who's going from NoDo to Mango is going to be super excited! On the WP7 front, Noborizaka has been updated but there was a slight hiccup with the publishing so it should be rolling out worldwide soon-ish...watch this space! more

  • WP7 - Upgrading Your App From 7.0 to Mango (AppHub x NeutralLanguageResource)

    A quick tip - the Marketplace Test Kit doesn't seem to catch this, but when uploading to AppHub, you need to ensure that all your assemblies have the NeutralResourceLanguage attribute set. This is a new requirement in Mango, presumably to handle all of the new languages and cultures that come as part of the update. Take a look at Step 3 of the guidance here, or alternatively, just add the … more

  • WP7: Generate Live Tile Images Locally (Without The Visual Tree)

    When updating your live tiles locally, if you've tried creating .jpgs programmatically using the WritableBitmap(UIElement) constructor you may have come across issues using complex UIElements like StackPanels or multiple elements. The main issue I had was one where the elements would just overlap each other and not actually stack or render in a manner they would if they were in the Visual Tree. … more

  • Kentico: Switching From Global Toolbar To Inline Toolbars In CMSDesk

    When using CMSEditableRegion controls, you can control the Toolbar set with the HtmlAreaToolbar property, and additionally you can pick whether you want to use the global toolbar at the top, or render an inline toolbar above the editable region (using the HtmlAreaToolbarLocation property). <cms:CMSEditableRegion runat="server" ID="MainContentText" RegionTitle="Main text" DialogHeight="320" … more

  • Pro-Tip: Splitting out CamelCase with Regex

    Found this online and it's pretty sweet: public static string Wordify(string pascalCaseString) { Regex r = new Regex("(?<=[a-z])(?<x>[A-Z])|(?<=.)(?<x>[A-Z])(?=[a-z])"); return r.Replace(pascalCaseString, " ${x}"); } Thanks to Chris Blankenship for providing this snippet on CodeKeep! :) more

  • Now That's What I Call Music(?)

    In the vein of the Onion A.V. Club feature series Then That's What They Called Music, I've started listening from Now That's What I Call Music Volume 1, and have been listening to it during my work day in order. I've got just about 70 albums worth to go through, and it's been quite interesting so far. You can really tell which songs have aged well, and which ones really haven't (case in point, … more

  • Kentico: Custom BizForm Validation

    Here's a quick tip on how to add custom validation to your BizForms in Kentico - for example, ensuring that a user has checked a "terms and conditions" checkbox, or that email addresses match. The BizForm control in Kentico provides quite a few events for which you can hook into, such as OnOnSaveFailed, OnOnValidationFailed, etc - but the one we're interested in is OnOnAfterValidate - this … more

  • WP7: How To Add Analytics Without Any Code With Dotfuscator

    Been thinking about adding some analytics to Noborizaka just so I can get a little bit more visibility around how it's being used and other data that'll help me improve it; and my first attempt at integrating analytics was with the MSAF (Microsoft Silverlight Analytics Framework). To my dismay, it turns out that MSAF is not currently compatible with Mango...so I needed another solution. Enter … more

  • Kentico: Useful CMSListMenu Properties - Path, MaxRelativeLevel and DisplayOnlySelectedPath

    When you're developing with the CMSListMenu control, there's a lot of useful controls you can use to get your navigation exactly how you want it. Path This is definitely the most important property which allows you to specify (much in the same manner as with CMSRepeater) what documents in your site you are going to surface. Useful special characters are %, which means include children from this … more

  • Pro-Tip: Kentico SmartSearch Result Transformations Gotcha

    Okay, I know I know, so much Kentico stuff! But I have one more thing to share, and it's a quick one. If you're creating a transformation for a Search Result repeater or datalist, don't use <%#Eval()%> - this won't work in most cases as the items being returned aren't the actual Documents but the Search Result items, which don't have the correct things to bind to for your Evals. Instead, … more

  • Kentico: Scheduled Task To Reindex Smart Search

    Update: as I was informed by Jakub from Kentico, you don't actually need to reindex your site in order for new content to appear in search results; this is all handled by Kentico automatically which is why a scheduled task to rebuild the index isn't provided by default (as the indexes only need to be rebuilt when there is a change to the document types or search fields). I'm leaving the code … more

  • Kentico: Programmatically Getting the Display For A Given Dropdown Field Value

    Here's a little bit of a technical deep-ish dive into some of the more esoteric inner workings of Kentico. The situation: we've got a dropdown list for one of our document types, and we've got numeric values and text displays to facilitate some form of future ordering, such as a hierarchical list of positions in a fictional law firm: The value that gets stored into Kentico is the numbers, and … more