public string FormateNewMessageUrl(string StringToFormate, string nametoremove) { string[] arr = StringToFormate.Split('?'); string qs1 = ""; if (arr.Length == 2) { qs1 = arr[1]; } CQueryString qs = new CQueryString(qs1); qs.Remove(nametoremove); return(arr[0] + (qs1.Length > 0 ? "?" + qs.SerializeQueryString() : "")); }
public string FormateNewMessageUrl(string StringToFormate, string nametoadd, string nametoaddValue) { string[] arr = StringToFormate.Split('?'); string qs1 = ""; if (arr.Length == 2) { qs1 = arr[1]; } CQueryString qs = new CQueryString(qs1); qs.Add(nametoadd, nametoaddValue, true); return(arr[0] + "?" + qs.SerializeQueryString()); }