0
공간이있는 파일 이름을 업로드하기 시작하는 버튼이 있습니다.브라우저 용 인 코드 파일 이름 spacebars (CS)
Firefox는 IE 용으로이 이름을 사용하지 못합니다.
csharp를 사용하여 밑줄에 공백을 인코딩하는 방법은 무엇입니까?
공간이있는 파일 이름을 업로드하기 시작하는 버튼이 있습니다.브라우저 용 인 코드 파일 이름 spacebars (CS)
Firefox는 IE 용으로이 이름을 사용하지 못합니다.
csharp를 사용하여 밑줄에 공백을 인코딩하는 방법은 무엇입니까?
하려면 string.replace (문자, 문자)에있어서,
string filename = "This is an example";
string encodedFilename = filename.Replace(' ', '_');
Console.WriteLine(encodedFilename);
는 "This_is_an_example"를 생산.
이 시도 : 따라서
String safeFileName = fileName.Replace(" ", "_");