stycleintenty
New Member
I'm working in a code-behind mode and can't seem to find a way to initialize a HttpPostedFile object.<BR><BR>I've gotten this far:<BR><BR>public void UploadBtn_Click(object sender, System.EventArgs e) <BR>{<BR> HttpPostedFile UploadFile = new HttpPostedFile();<BR> UploadFile.SaveAs("c:\foo.txt");<BR>}<BR><BR>But, I get the message "No overloaded for method HttpPostedFile takes 0 arguments". The kicker is - this works fine when done on the .aspx page (without the declaration of course).<BR><BR>Any ideas?