Link to home
Start Free TrialLog in
Avatar of Bobby X
Bobby XFlag for United States of America

asked on

Need help with C# string...

Hi,

Can someone please tell me how come the following method is converting the "&" into "&amps"?   In other words, it's returning something like "http://www.mywebsite.com?section=5&spage=products&scat=123" instead of "http://www.mywebsite.com?section=5&page=products&cat=123". This is being used in asp.net mvc 4.

using System.Web.Configuration;

public static string GetSiteUrl()
        {
            return WebConfigurationManager.AppSettings["SiteUrl"] +
"&page=products&cat=123";
        }

Many thanks in advance.
ASKER CERTIFIED SOLUTION
Avatar of Rikin Shah
Rikin Shah
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial