1

File paths look like "wwwroot\\documents\\file.png" but web platforms don't like this style, the img HTML tag src value wants "/wwwroot/documents/file.png".

System.IO.Path.Combine does not meet my needs.

What can I do except Replace("\\","/");?

Konrad Rudolph
  • 530,221
  • 131
  • 937
  • 1,214
ihsancelik
  • 11
  • 3
  • https://learn.microsoft.com/en-us/dotnet/api/system.uribuilder?view=netframework-4.8 – CoolBots Sep 22 '19 at 15:22
  • URI ≠ file path. Use proper classes, not strings, to represent these objects, and this problem won’t occur. *Don’t* use string replacement methods here instead of proper types. They’re a hack. – Konrad Rudolph Sep 22 '19 at 16:09

0 Answers0