Helephant.com is the personal site of web developer, Helen Emerson. It's a blog where I record all the things I learn about web development and ASP.NET.
Recent posts
-
Javascript method context -
In languages like C# and Java you never really need to give a thought to the
thisoperator. In javascript things are a little more complicated due to functions being first class objects.
Posted 2 months ago - 3 comments -
CSS3 Multiple background images -
Firefox 3.6 supports multiple background images so I thought it was time to give them a go and figure out how they work. May contain small rant about beautiful markup.
Posted 3 months ago - 4 comments -
IE6 absolute positioning in parent with odd width -
A small browser quirk for IE6 where absolute positioning with the CSS right property is one pixel out when the parent container has an odd number of pixels.
Posted 5 months ago - Add comment -
Building javascript minification into MSBuild scripts -
How to use a tool called Packer.NET to build javascript minification into a MSBuild script.
Posted 5 months ago - Add comment -
Why I don't like reset stylesheets -
I don't much like reset stylesheets. They make extra work when creating CSS and are an extra request for the browser to make to build a page.
Posted 5 months ago - 4 comments -
Sweet error message that made me smile -
Firefox 3 crashed on me for the first time today (thanks Sharepoint!). Their error message when they couldn’t reopen my tabs made me smile:
Posted 6 months ago - 1 comment -
Javascript prototype chaining -
Prototype chaining is used to build new types of objects based on existing ones. It has a very similar job to inheritance in a class based language.
Posted 6 months ago - 1 comment -
SVG images as CSS backgrounds -
Experimenting with using an SVG image as a CSS background image.
Posted 6 months ago - 1 comment -
A great big welcome to inline-block! -
Inline-block is a halfway point between setting an element's display to inline or to block. It keeps the element in the inline flow of the document like display:inline does, but you can manipulate the element's box attributes (width, height and vertical margins) like you can with display:block.
Posted 6 months ago - 3 comments -
Restarting an IIS6 app pools using .NET -
Two little code snippets for recycling IIS6 application pools in through .NET code.
Posted 6 months ago - Add comment -
Our web 2.0 wedding -
The story of how Joe and I used our favourite web tools to organise our wedding and share the experience with the people who couldn't be there.
Posted 6 months ago - 2 comments -
Max Barry on risk -
One of my favourite authors, Max Barry, talks about different types of risk and how the idea of a no risk possibility makes it harder to tell big risks from little ones
Posted 6 months ago - Add comment -
Geeks are great but bet on the non-techies -
Why I use facebook (which I don't much like) and stopped using ICQ (which I loved).
Posted 7 months ago - 2 comments -
Ada Lovelace day – Molly Holzschlag, Kathy Hassinger and my mum -
Stories about three geek women who I admire to help celebrate Ada Lovelace day.
Posted 10 months ago - 1 comment -
To(): a handy way to convert strings to other types -
The int.parse() method is one I use a lot in ASP.NET so I wrote a handy extension method called To using generic return types and a little reflection that makes converting all these string values to another type incredibly simple.
Posted 11 months ago - 3 comments -
Improving the way ASP.NET handles 404 requests -
How (and why) to make your ASP.NET site's error handling better by returning the right response codes and redirecting to the error page without changing the url.
Posted 12 months ago - 1 comment -
Date for OpenTech 09 announced -
One of my first and favourite UK conferences, OpenTech have just announced the date for 2009 is going to be July 4th.
It’s got more of a beardy, open source, linux feel to it than DDD day does but that’s one of the things I like about it. The talks are always really interesting. One year [...]
Posted 12 months ago - Add comment -
Svelte asp.net: avoiding <form runat="server"> -
postbacks add a lot of weight to your page and you don't always need them. Find out when you can do without them and how to use ASP.NET without paying the postback price.
Posted 12 months ago - 1 comment -
Opening resx files in the xml editor -
Defaults can never please everyone. There’s always someone whose workflow is a little different. That one developer who likes to use SeaMonkey to test their pages or that weirdo who prefers to edit resx files as a text file.
I am that weirdo who likes to edit resx files as text files and rather than argue [...]
Posted 1 years ago - Add comment -
Snowy London Underground sign -
It’s a snowy day in London today. Apparently the most snow London’s seen in 20 years. It’s definitely the most snow I’ve ever seen. I was covered in snow and looking like a big white yeti by the time I got to the station this morning.
I’ve been keeping an eye on the Transport for London [...]
Posted 1 years ago - 1 comment -
Reducing viewstate on custom controls -
One of the biggest waste I see in using viewstate is that it persists values that are already set in the aspx. These get set every time that the page runs and don’t need to be round tripped to the browser so that they will be persisted.
I did a little experiment a while back where [...]
Posted 1 years ago - Add comment -
Goodbye 2008. Hello 2009 -
Wow, it’s January 18th already. I feel like I’ve really hit the ground running. Everyone else who did their new years post did them two weeks ago but I really wanted to write down what I’d achieved in 2008 and what I wanted to achieve in 2009 to give myself something to look at in [...]
Posted 1 years ago - 8 comments -
Javascript object prototype -
The javascript object prototype is javascript’s way of sharing implementation across similar objects, much like the way classes are used to do this in many other languages. Although constructor functions look a lot like classes, javascript does not have a class based object system like C# or Java. Instead it has a prototype based object [...]
Posted 1 years ago - 10 comments -
Javascript null or default operator -
A neat little trick I learnt from Ting is a way to check whether a value was null or undefined using the or operator (||).
It’s really simple. If valueThatMightBeEmpty has a value set, you get that value. If it is null you get the default. It’s just like the ?? operator in C#:
var value = [...]
Posted 1 years ago - 1 comment -
Big (non-technical) Helen news -
This is a tech blog but I just wanted to share a little bit of big Helen-life news with the friends of mine who read it. Joe, my boyfriend of four years, proposed to me on Friday night very romantically on the London eye and I said yes (of course!). I’ve been grinning like mad [...]
Posted 1 years ago - 1 comment
Favourites
-
How javascript objects work -
This is a series of articles about how to use the javascript language features to write object oriented type code.
-
Saving server control properties to ViewState with custom attributes -
Use custom attributes to take the tedious work out of creating server control properties that persist to ViewState.
-
Form layout using negative margins -
Use negative margins and light weight semantic markup to display a form with the labels on one side and form elements on the other.
-
Generic method return types -
Generics aren't just great for creating lists, they can also be used to return strongly typed information from a method.
-
Web Standards for ASP.NET developers -
Find out more about doing web standards compliant development if you develop in asp.net..
-
DIY javascript stack trace -
How to use arguments.callee to walk up the javascript call stack when you're doing something that a debugger can't help you with..
-
Using print stylesheets with ASP.NET themes -
Using the @media css declaration to create a print stylesheet when you're using ASP.NET themes to automatically include stylesheets..
