BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9
This is the forum to discuss the Wrox book Professional ASP.NET 2.0 Special Edition by Bill Evjen, Scott Hanselman, Devin Rader, Farhan Muhammad, Srinivasa Sivakumar; ISBN: 9780470041789
You are currently viewing the BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
I'm getting two errors from this code. The first is a syntax error on the first line which I was able to correct by moving the brackets:
Code:
Byte[] myByteArray;
The second error that I'm getting is on the fourth line. The System.IO.Stream object does not have a ToArray() method. The VB example above it uses System.IO.MemoryStream, which does have a ToArray() method, but I have to cast the file content:
Code:
myStream = (MemoryStream)FileUpload.FileContent;
...which builds but is throwing an invalid cast error when I run it.
Ultimately I need to pass this into an insert parameter...