Ich weiß, das wird oft gefragt, aber ich konnte nicht genau finden, was ich brauche. in path.combine in C#
Ich möchte den Serverpfad und fügen Bildpfad zu diesem hinzu. Ich habe das
string mypath = Request.Url.GetLeftPart(UriPartial.Authority);
string uploadPath = Path.Combine(mypath, "Upload/Images/");
Response.Write(uploadPath);
Diese http://localhost\Upload/Images/
gedruckt, warum gibt es eine \
in der Mitte des Weges.
ich es fest von /
zu mypath
wie diese
string mypath = Request.Url.GetLeftPart(UriPartial.Authority) + "/";
Zugabe Ist dies der richtige Weg? Oder gibt es einen besseren Weg dies zu tun?