I'm trying to download a csv file from the following link but an exception "illegal characters in path error" is thrown at the last line. I believe it's the question mark sign in the link that messes up everything but I have to get it working.. Any suggestions?
string remoteUri = "download.finance.yahoo.com/d/quotes.csv?s=%40%5EDJI,aapl&f=o&e=.csv";
string fileName = "aapl.csv", myStringWebResource = null;
// Create a new WebClient instance.
WebClient myWebClient = new WebClient();
// Concatenate the domain with the Web resource filename.
myStringWebResource = remoteUri + fileName;
// Download the Web resource and save it into the current filesystem folder.
myWebClient.DownloadFile(myStringWebResource, fileName);