Author: run4it | Posted on: 1/2/2009 10:39:40 AM | Views : 293

 I want to write a method in my BusinessLogic Utility class, that when called from anywhere with my application will replace an "&" within a string with its character entity "&" so that my pages will validate.
I used the replace function locally to test and it worked when written like this:
 this.advisingUrl = advisingUrl.Replace("&", "&");
 
But when writing it as a method, it doesn't work.  I get no errors though and I do get a successful build.
I wrote the method like this:
namespace CheckOutACollege.BusinessLogic
{

public static class Utility
{ 
    public  static string ReplaceAmpersand(string URL)
        {
            URL.Replace("&","&");
    & ...

Go to the complete details ...