Friday, September 28, 2007

Scrollable Table with fixed header using CSS

Scrollable Table with Fixed Header, repeat print header and ... This frozen / locked HTML table header is a usability advance done without HTML fakery such as hidden tables, frames, or JavaScript. Tested in (Windows) Mozilla-spawned browsers (incl. Netscape 6+ and Firefox) and IE5+. IE has problems with the screen behavior of the footer—but thanks to a clever expression provided by Renato Cherullo, even IE6 can have a modern footer. Mozilla self-induces display problems cramming the scrollbar into the last column, which can be corrected with advanced selector syntax. Surprisingly, both render the printed version of the table consistently well, including the repeated headers and footers. --------------------- Ever wanted to create a table to display data which head frozen headers and/or frozen footers like MS Excel allows? read this article to find out how. I have searched long and hard for a solution like this and now that I found such a simple one it is rather embarrassing that I didn't think of it myself.

using .resx files to localize asp.net web applications

How to use application resource files (.resx) to efficiently... You can use application resource files (.resx) to efficiently create a localizable Microsoft ASP.NET Web application. By using resource files, you can store localized values for controls. The localized values are based on a user’s language and culture. When you store localized values in resource files, ASP.NET can select the appropriate value at run time. ----------------------- This page describes how to create a localized resx file in Visual Studio.NET. essentially after the first resx default file is created you just copy it and insert an extension for the language code you are looking to support, make sure localization is turned on in your app and .net handles the rest.

Thursday, September 27, 2007

New method of hanging onto notes

I recently discovered Google's Bookmark feature which allows me to put a really cool javascript button on my toolbar. It isn't a complete replacement for the blog as it lacks easy access and search features, but as a basic and transportable bookmarking system it works really nice.

It's these extra little features that keep popping up that keep me with google.

SQL Where clauses: Avoid Case, use Boolean logic

SQL WHERE clauses: Avoid CASE, use Boolean logic As some of you may know, I recommend to avoid using CASE expressions in the WHERE clause of a query to express conditional logic. I prefer to have everything translated to simple ANDs, ORs and NOTs to keep things a) portable, b) easier to read and c) efficient. ------------ Apparently Coalesce() in the Where clause removes the queries ability to use an index for evaluating that column. Makes the code a tad bit messier but really good to know when to use boolean logic.

Tuesday, September 25, 2007

Download IE6 standalone dll's

dhtmldev.com - Standalone IE6 for Testing Most users still use Internet Explorer 6, while most developers have upgraded to ie7. So how do you test in ie6? Most people designate another machine as an ie6 box, and then turnoff automatic updates. Oops, it was upgraded by the new guy. Nice. Anyway, for one reason or another it would be sweet to run both ie6 and ie7 on the same computer. After a lot of googling "ie6 side by side install" and "ie standalone" etc., and reading a bunch of crap, I found a nice standalone version at browsers.evolt.org and a nice added dll from positioniseverything. So I zipped everything (link at bottom) and wrote these instructions. Enjoy!

Tuesday, September 18, 2007

Cast varchar to datetime

CodeGuru Forums - Convert a Varchar in a DateTime SELECT * FROM tab_val WHERE (CASE ISDATE(val) WHEN 1 THEN CAST(val As DateTime) ELSE NULL END) > CAST('2003-05-05 08:00:00.000' As DateTime) ------------------- When casting a varchar to a datetime it is critical that all the datetime pieces (such as minutes, seconds...) are in the string. Otherwise an error will be thrown.

Aspnet Membership Password manipulation

Brian Mishler on .Net - Asp.Net Membership Password Administ... The Asp.net membership provider was designed to allow for self-service password management but through an understanding of the configuration options as well as a combined use certain provider methods, web site administrators can effectively manage member passwords. This article briefly summarizes the various settings and methods which can be combined to administratively manage passwords in an Asp.Net membership system based on the default SQLMembershipProvider. ------------------ This article give a good summary of how to manipulate passwords in the aspnet membership framework, including retrieval which is what I needed this time.