Format String with String.Format and C#

January 3rd, 2009
<%# String.Format("{0:#####-####}", Convert.ToInt32(Eval("ZipCode"))) %> It is necessary to convert the ZipCode field to an integer in this instance because the Format class expects an integer to properly format a number, otherwise it will only return the string or value that you passed to the Format class. I am using this in conjunction with the MaskedEditExtender, which removes [...]
Read more on Format String with String.Format and C# »

MySQL File Access, Access Denied

December 31st, 2008
If you need to access files for importing directly from MySQL you may have encountered an error stating the following. Access denied for user: 'user@localhost' (Using password: YES) The user used to execute the import needs the FILE privilege in order to complete a command similar the one below. LOAD DATA INFILE filename INTO TABLE products FIELDS TERMINATED BY '|' LINES [...]
Read more on MySQL File Access, Access Denied »

Set PHP Include Path in htaccess

December 26th, 2008
If you do not want to change the include_path directories (or you don’t have access to php.ini) you can still set the include_path value within your root .htaccess file. Update/Create /doc_root/.htaccess Unix/Linux Servers php_value include_path "/path/to/include" Windows Servers php_value include_path "C:/path/to/include" PHP To call the include within PHP do the following: require_once('file.php'); The file above is in /doc_root/include/file.php Options Multiple include directories If you have multiple include [...]
Read more on Set PHP Include Path in htaccess »

GoDaddy Now Allows Direct Access to MySQL on Shared Hosting Plans

December 25th, 2008
GoDaddy.com has recently added the ability for shared hosting plans owners to access their MySQL databases directly. Once you start the MySQL creation process you will have the option to Allow/Disallow direct access. This is very useful if you do not want to use phpMyAdmin to administer your MySQL database such as an initial import that exceeds [...]
Read more on GoDaddy Now Allows Direct Access to MySQL on Shared Hosting Plans »

Backup Windows Mail on Vista with xcopy

December 25th, 2008
I know you can backup your email directly from within Windows Mail but this script saves me a few clicks and I can run it in a scheduled task so I can set it and forget it. Download For impatient you can download the batch file here. Find Windows Mail Store Location Open Windows Mail and open Tools/Options. [...]
Read more on Backup Windows Mail on Vista with xcopy »

Sponsors