PHP 5 on Windows 2003 Server (IIS)

Here are my notes on setting up PHP 5.1.6 on a Windows 2003 server (SBS). Must have “c:/php/” in system PATH environment variables (must reboot server when changing). In IIS under Web Service Extentions must have c:\php\php5isapi.dll Enabled. In IIS under the default web site (and particular web site to use PHP), configure the Application extention […]

Background color change with roll over

Use this code to cause a row’s background color to change with a mouse over: <tr style=”background-color: #F4F9FF;” onmouseover=”this.style.backgroundColor=’#C1D0E4′;” onmouseout=”this.style.backgroundColor=’#F4F9FF’;”> This works in IE and FireFox. Here is an example: http://www.thehousedesigners.com/adkit/

Permanent Redirect

Instead of doing a Response.Redirect to point to a page in a new location (I.e. the page has been renamed), do a permanent redirect. Using this code tells the search engines to no longer index the old page but to index the new page.    Response.Status = “301 Moved Permanently”   Response.AddHeader “Location”, “new-page-name.asp”

CSS Alignment Tip

When positioning text on a page in CSS add this code to view the element borders: border-width: thin; border-style: solid; That way you can see where the spaces are and can adjust the elements spacing.  

GridView Format Note

When applying a Format expression in the DataFormatString property of a column such as “{0:d}” the HtmlEncode property must be set to False. If HtmlEncode is set to True the format expression will not be applied.