you can try out the following link
www.devx.com/tips/Tip/37412