string strFileName = "";
// retrieve the name of the file that is posted.
strFileName = oFile.PostedFile.FileName;
strFileName = Path.GetFileName(strFileName);
I am getting the following error at this statement --------- strFileName.Replace(":","_")
error: 'strFileName.Replace' does not exist
I am trying to achieve the following. If the strFileName consists of a COLON(:) charater, i wish to replace it by UNDERSCORE(_). Since i cannot save any file with a COLON in its name.
Also please suggest a function which checks for all invalid characters in a new file save operation.