Rather than using str_uploadpath + fileName
, try using System.IO.Path.Combine
instead:
Path.Combine(str_uploadpath, fileName);
which returns a string.
More Related Contents:
- How do I save a stream to a file in C#?
- Reading large text files with streams in C#
- How do I convert struct System.Byte byte[] to a System.IO.Stream object in C#?
- Event Bubbling and MVP: ASP.NET
- Stream.Seek(0, SeekOrigin.Begin) or Position = 0
- How do I concatenate two System.IO.Stream instances into one?
- An elegant way to consume (all bytes of a) BinaryReader?
- HttpWebRequest & Native GZip Compression
- When or if to Dispose HttpResponseMessage when calling ReadAsStreamAsync?
- How to get a MemoryStream from a Stream in .NET?
- How can I split (copy) a Stream in .NET?
- Why do we need boxing and unboxing in C#?
- Ignoring a class property in Entity Framework 4.1 Code First
- Is there a .NET/C# wrapper for SQLite? [closed]
- How to compare two rich text box contents and highlight the characters that are changed?
- Solid FFmpeg wrapper for C#/.NET
- JToken: Get raw/original JSON value
- GUI and windows service communication
- Metadata were not loaded using MetadataType
- GC.Collect()
- Ghost-borders (‘ringing’) when resizing in GDI+
- C# Windows Form .Net and DOS Console
- .NET Core and System.Drawing
- .Net regex: what is the word character \w?
- How to List Directory Contents with FTP in C#?
- Why doesn’t C# support implied generic types on class constructors?
- Difference between .Net Core, Portable, Standard, Compact, UWP, and PCL?
- Use Google Analytics API to show information in C#
- Implementing a timeout on a function returning a value
- Json.net rename properties