For the full path use Page.ResolveUrl(), for a relative path (relative to the user's browser) use Page.ResolveClientUrl. Both will take in the ~ format and map it to a real path. If you are in a control, the methods are available from Control as well (Page is a type of Control).
Jeremy Likness Latest Article: Whats in Your Collection? Part 1 of 3: Interfaces Blog: C#er : IMage