string url = "https://i.cnblogs.com/EditPosts.aspx?opt=1&type=2"; string param = url.Split('?')[1]; string optParam = HttpUtility.ParseQueryString(param).Get("opt"); string type = HttpUtility.ParseQueryString(param).Get("type");