Archive of 2009 May
-
CSS tricks – part 1
Posted on May 31, 2009 by Frederik Vig in Code Snippet, CSS, Web designHere are a few CSS tricks I've picked up along the way. Always visible vertical scrollbar When you have a fixed width centered web site open you've probably noticed that the page sometimes jumps a little. This is because the vertical scrollbar...
Continue reading this entry → -
EPiServer filter – part 1
Posted on May 28, 2009 by Frederik Vig in Code Snippet, EPiServerOften we need to filter some of the pages in our PageDataCollection. Perhaps we wish to only show the pages that are published or that the user has access to. For this EPiServer has a few filter classes. Below you'll...
Continue reading this entry → -
ASP.NET Validation and jQuery
Posted on May 21, 2009 by Frederik Vig in ASP.NET, JavaScriptRecently I was working on a simple form that used the ASP.NET Validation controls for validation. This worked fine when doing a regular Postback to the server with the data. However I wanted to use Ajax to make it a...
Continue reading this entry → -
Master Pages and EPiServer CurrentPage property
Posted on May 20, 2009 by Frederik Vig in Code Snippet, EPiServerWhen you use user controls or web forms in your EPiServer web application you usually inherit from either UserControlBase or TemplatePage. Which gives you, among other things, the CurrentPage property. The problem is when you need the CurrentPage property in...
Continue reading this entry → -
EPiServer Link Collection Property
Posted on May 18, 2009 by Frederik Vig in ASP.NET, C#, Code Snippet, EPiServerThe EPiServer Link Collection Property allows you to add links to web pages, documents and e-mail addresses. For a nice overview see this post: EPiServer 5 R2 and Link Collection property In this example I'm going to show you...
Continue reading this entry → -
Measuring JavaScript performance
Posted on May 10, 2009 by Frederik Vig in Code Snippet, JavaScriptAccording to Response Time overview, the response time for JavaScript code to execeute should be no more than 0.1 seconds (100 milliseconds). Especially on JavaScript/Ajax heavy sites this can be a problem. That's why it is always good thing...
Continue reading this entry → -
Transparent PNGs
Posted on May 5, 2009 by Frederik Vig in Web designThis is mostly for my own reference, but hopefully useful for others as well. I always forget to add a pngfix for Internet Explorer 6 when using transparent PNGs. There are a few fixes out there. 24 ways: Transparent PNGs in...
Continue reading this entry → -
EPiServer Extension Methods
Posted on May 4, 2009 by Frederik Vig in Code Snippet, EPiServerHere are some EPiServer extension methods I use in my projects (remember that you need to use .NET 3.5 or later). Update These, and more have been added to the EPiServer World Community project EPiCode.Extensions on EPiCode. Be sure...
Continue reading this entry → -
Safely Cast from bool? to bool
Posted on May 4, 2009 by Frederik Vig in C#, Code SnippetThis is a little code snippet for when you need to cast a nullable type to its value type. if (startPage.ShowMainFeatured.HasValue) { // Safe to cast if ((bool) startPage.ShowMainFeatured) {...
Continue reading this entry →