Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

C# File Upload Error

Status
Not open for further replies.

CJAI

MIS
Oct 21, 2003
224
US
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();
		}
 
any ideas, working on a tight deadline....

Thanks much!
 
use "String"...

Known is handfull, Unknown is worldfull
 
what errors???

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top