I'm using a simple upload script to upload a file from a web page but I keep getting a "Invalid expression term 'string'" error in the bolded line below.
Code:
//Set path to store file
filePath = @"C:\Inetpub\[URL unfurl="true"]wwwroot\";[/URL]
//Call Function to save file to hard disk
[b]WebForm1.WriteToFile[b](string filePath, ref myData);[/b]
}
else
{
// No file
Jason_Label.Text = "Please select a file before submittal";
}
}
// Writes file to current folder
private void WriteToFile(string strPath, ref byte[] Buffer)
{
// Create a file
FileStream newFile = new FileStream(strPath, FileMode.Create);
// Write data to the file
newFile.Write(Buffer, 0, Buffer.Length);
// Close file
newFile.Close();
}