Author Archives: Kjetil H

How to assign a ringtone to your iPhone 5 from the iTunes Store

Find the ringtone in the iTunes Store. Buy the ringtone. Important step! A dropdown menu will appear, press the option called “Set as default ringtone”. Note if you didn’t choose the “set as default ringtone” option, it appears the only … Read more

Posted in iPhone | Leave a comment

MVC 2 – Model binding happens automatically for properties not fields

For some reason, when developing MVC 2 (C#) projects, post data are not automatically bound to class members defined as Fields, but they will be bound to Properties. So this won’t work: but something like this WILL work: Hope this … Read more

Posted in C# | Leave a comment

HTML/DOM attribute change events and how it can improve maintainability in your web application

Do you find yourself in an unmaintainable mess where there’s DOM manipulation calls in every part of the code? Would it not be easier to simply set an attribute f.ex. data-progress=”50″ and then see the elements change automatically (seemingly by … Read more

Posted in JavaScript, jQuery | Leave a comment

Google API nightmare: How I fixed the “Could not load file or assembly ‘System.Net.Http.Primitives, Version=1.5.0.0 …” exception

PS: This solution may or may not apply to your situation; my environment consisted of VS 2012, .NET 4.0, C#, Non-MVC web application, EPi Server CMS. Well aren’t the Google API a joy uh? Spent way too much time figuring … Read more

Posted in C#, Google, Visual Studio | 9 Comments

How to access array elements of a VBScript class property (returning an array)

To my surprise it doesn’t seem possible to access array elements when directly referencing a class property in VBScript. This means you cannot do this: Strangely enough it is possible to access the array elements from within the class itself, … Read more

Posted in VBScript | Leave a comment

How to debug an infinite request/loading for an IIS website AND what my problem was

First I’ll explain how you can debug a hanging (seemingly infinite loading) of your IIS website. Then I’ll write a bit about my specific problem; in short the application pool targeted the wrong .NET framework version. Debugging an infinite request/loading … Read more

Posted in IIS | Leave a comment

How to assign properties to the default ‘Content’ tab with PageTypeBuilder

The “Content” tab is actually named Information, not “Content”. Just see for yourself at /CMS/Admin/Tabs.aspx (Admin Mode -> General Settings -> Page Type -> Edit Tabs). Under follows a definition of the Information tab (also called the Content tab)

Posted in EPiServer | Leave a comment

EPiServer: Remember to set a PageName for programmatically created Pages

When attempting to import an exported EPi Server site I got the error message Exception: “Name” cannot be empty.[] appearently when importing a page. Add two together and you’ll quickly realize that a Page lacks a PageName.. or do like me … Read more

Posted in EPiServer | Leave a comment

Simple helping function for managing dependencies in JavaScript

Here’s a very simple helping function that can be used to manage arbitary dependencies in your script. The dependency check is defined with a callback so you can write dependencies for when DOM is loaded, a script is ready or … Read more

Posted in JavaScript | 1 Comment

Possible issue when omitting semi-colons in JavaScript

In my latest JavaScript projects I’ve tried to omit the semi-colon (;) on line endings. Why? I don’t know, because I can? I’m not going to go into a deep discussion about this subject here but rather warn others who … Read more

Posted in JavaScript | Leave a comment