Andi Smith on October 8th, 2008

Sometimes when I’m using Microsoft Visual Studio for my web applications, I find that it gets it’s knickers in a twist over designer files. Designer files are generated by Visual Studio and are used to allow you to create a class which has code in multiple files (known as partial classes).

It’s actually very easy to regenerate designer files (or restore them should you have deleted them) once you know how. Just follow these simple steps:

  1. If it is not already removed, deleted the designer.cs file. You can do this by right clicking on it within Solution Explorer and selecting ‘Delete’.
  2. Right click on the aspx/ascx page which you need to create a new designer file for.
  3. Select the ‘Convert to Web Application’

And, hey presto, a fresh, new trouble-free designer.cs file which won’t cause problems with your build!

Continue reading about Force Regeneration of Designer.cs Files

Andi Smith on August 4th, 2008

I thought I knew, but it turns out I didn’t.

While searching through the error logs of a multiple locale project at work, I discovered users using accents in their email address, which were failing the system’s validation techniques.
Looking around on the Google, it turns out most people have made the same mistake I did. The actual set of characters allowed for an email address are far greater than I could have ever imagined.

Check out this article on Haacked about the subject.

Continue reading about What Constitutes a Valid Email Address?

Andi Smith on July 28th, 2008

Using WCSS, it is possible to limit the type of content that can be entered into an input field on a mobile/cell phone by defining the input mask or input mode using the CSS property -wap-input-format. When the user goes to enter information into a input field, their mobile phone will require the character mode you specify.

This article discusses those modes and how to use them.

Click to continue reading “Default Input Mode”

Continue reading about Default Input Mode

Andi Smith on March 17th, 2008

You can make one web page look and feel differently over many different media types by using the media attribute inside the link element when referring to an external stylesheet.

For example, we are used to linking to a stylesheet using the following syntax:

<link rel="stylesheet" type="text/css"
             href="/library/css/style.css" />

By including a media attribute, we can limit this stylesheet to a particular media type. For example:

<link rel="stylesheet" type="text/css"
             href="/library/css/style.css" media="screen" />

Media Selectors

Potentially, this allows us to format our site differently depending on how the user is viewing the page.

Click to continue reading “CSS Media Selectors”

Continue reading about CSS Media Selectors

Andi Smith on March 14th, 2008

Getting traffic to your website can be difficult. But keeping visitors can be even tougher. Visitor’s are more likely to revisit your website if they have a good experience. Here’s just a few items to consider in order to improve your visitor’s experience to your website. No doubt we’ll run a second article on user experience soon!

Navigation Maze

Click to continue reading “User Experience Considerations”

Continue reading about User Experience Considerations

Andi Smith on March 7th, 2008

Smashing Magazine has a very useful article to help all you freelancers (or otherwise) create an amazing online portfolio.

Online Portfolios

The article details the pitfalls to avoid, and offers 12 points to consider in order to make an effective design. Check it out!

(Image taken from Marius Roosendaal’s portfolio)

Continue reading about Creating a Successful Online Portfolio

Andi Smith on February 28th, 2008

In the old days of 2D computer games, graphics were drawn on screen using sprites. As games and their graphics got more complex, memory and speed issues began to surface, and as a result a technique using sprite maps was invented, which would place all animations for a character into one image, and then use mapped positions to display the correct frame of animation at any time. So can the same method be applied to websites, and what are the advantages?

CSS Sprites

Having a website with many images can have a large overhead on loading times with the browser having to request each image individually from the server. Placing multiple graphics into the same image file would mean there would only be one request to the server. It’s natural to think that increasing the image dimension would actually mean it would incrementally increase the file size too; but one image means that there is only one colour table, one set of meta properties and also your image software may be able to match patterns between the two images and reduce file size during compression.

The technique of placing multiple images into one image file is known as ‘CSS Sprites’, and it can be very useful for smaller icon sets and for buttons where you need to quickly load the hover state graphic.

Click to continue reading “CSS Sprites”

Continue reading about CSS Sprites

Andi Smith on February 19th, 2008

This week’s tip is actually a link to a blog entry about JavaScript notations and comes from Chris Heilmann’s ‘Wait till I come!‘ site.
If you’re still learning JavaScript, or perhaps you are self-taught, you may find this article useful as Chris shows us some of the more useful JavaScript shortcut notations available.

JavaScript Notations

Click to continue reading “JavaScript Notations”

Continue reading about JavaScript Notations

Andi Smith on February 12th, 2008

Thanks to the way older versions of Internet Explorer browsers render particular HTML elements, often it’s not possible to supply the same CSS stylesheet to every browser.

Thankfully, Internet Explorer supports conditional comments, and is the only browser to do so, which allows us to specify special CSS stylesheets for different versions of Internet Explorer, from version 5 upwards.

Internet Explorer / Firefox Toilets

Conditional comments are structured in the same way as HTML comments, meaning browsers other than Internet Explorer will just treat them as comments, while IE has special code which looks for the conditions’ syntax within comments. They can only be placed in HTML files and are written in the format:

<!--[if expression]> HTML <![endif]-->

Click to continue reading “Conditional Comments”

Continue reading about Conditional Comments

Andi Smith on February 1st, 2008

Cascading StyleSheets (CSS) are a powerful tool for designing websites, but everyone has different authoring styles and writes CSS differently. In this week’s tip, I will show you how I tend to write my own CSS, in a way that keeps it tidy and easy for others to reference. This article assumes you already have a basic knowledge of how CSS works.

CSS - The band

Click to continue reading “Writing CSS”

Continue reading about Writing CSS