public static String HtmlEncode(string text) { String retVal = HttpUtility.UrlEncode(text); retVal = retVal.Replace("+", "%20"); return retVal; }