Encode filename spacebars for browser (CS)
I have a button that starts uploading a filename that has Spaces. Firefox fails to use this name, its OK for IE. How to encode spaces to underlines with csharp?
The String.Replace(char, char) method, thus: string filename = "This is an example"; string encodedFilename = filename.Replace(' ', '_'); Console.WriteLine(encodedFilename); Produces "This_is_an_example".
Try this: String safeFileName = fileName.Replace(" ", "_");
How to get search results from Google with Java or C#?
Why can't non-verbatim strings contain newlines?
Window vs Page vs UserControl for WPF navigation?
KeyEventArgs event not working
Sending post data on Windows 8
Convert String to corresponding Forms.Keys value?
Convert Visual Basic (.net 1.1) project to C#
Send email from aspx page
Use view from other MVC project
C# recursive programming with lists
Change metro app background using a image from Uri
How to loop collections in LINQ and pass on data
C# - DataGridView - always display TopLeftHeaderCell
reflection with stacktrace / stackframe to get both methods name and parameters
Distance between two numbers in looping sequence [closed]
Back button disabling links in content placeholder?