Category Archives: Tutorials

“Error establishing a database connection” : WordPress Error Resolved

If you manually installed WordPress into your hosting account and are getting an “Error establishing a database connection” message when trying to connect to WordPress, you need to modify your wp-config.php file to work with our Database servers. /** The … Continue reading

Get File Name using Javascript : ASP.NET FileUpload Control

Many of C# developers looking for getting filename at client side. Following is the solution for that. <%@ Page Language=”C#” AutoEventWireup=”true” CodeBehind=”upload.aspx.cs” Inherits=”UploadImagePreview.upload” %> <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “”> <html xmlns=””> <head runat=”server”> <title></title> <script type=”text/javascript”> function … Continue reading

Permalinks – “You should update your web.config now”

If you are running your wordpress hosting on Windows server at that time you may face this issue. When you change your Permalinks from one value to another, on save changes it will ask you to change your web.config file. … Continue reading

Moving wordpress or changing server port keeps redirect to www

Today I was trying to setup my live website data in local wordpress site.. for that I have take backup of mysql database in form of scripts and copy wp folder into local wamp directory.. database was restored successfully too.. … Continue reading

Change WordPress theme from database

Today before few hours ago.. I changed my wordpress theme and I had some error in my new theme. When I enabled the new theme, I got a error page with few written lines in php. I was unable to … Continue reading

SQL Server – LTRIM() and RTRIM() Functions

Usage : The TRIM function in SQL is used to remove specified prefix or suffix from a string. This is the most common pattern to remove white spaces. Syntax : LTRIM(str): Removes all white spaces from the beginning of the … Continue reading

Calculate date difference using Javascript

Calculating date difference in JavaScript is very easy as in .Net, Java or PHP, but requires a bit different approach. For this post i wrote simple example which can calculate difference between two dates in: days and months. you can … Continue reading