I am using CSOM for creating new file. The file name contains specials characters.
The file name is !@@#$#%$%^^&^&(())(_+{}}.rar If I create file name as it is it gets fails or partially created
FileCreationInformation f_ObjInfo = new FileCreationInformation();
f_ObjInfo.ContentStream = new MemoryStream();
f_ObjInfo.Url = f_Url+ "/"+"!@@#$#%$%^^&^&(())(_+{}}.rar"
f_DestFolder.Files.Add(f_ObjInfo);
f_DestFolder.Update();
f_CContext.ExecuteQuery();
How can I handle special characters wile file creation?
Update
I also tried with
System.Web.HttpUtility.UrlEncode("!@@#$#%$%^^&^&(())(_+{}}.rar");
but not able to encode all characters properly.
Thanks in advance.
UrlEncode
return?