开发者

How to send doc file to database in asp.net

I want to send (INSERT) a doc file, e.g resume into a t开发者_如何学JAVAable of my database. What is the code required to perform this in asp.net 3.5?


Convert the posted file into a Byte Stream.

byte[] myByte = new byte[fupUpload.PostedFile.ContentLength];
Stream imgStream = fupUpload.PostedFile.InputStream;
imgStream.Read(myByte, 0, fupUpload.PostedFile.ContentLength);

Then save the myByte stream into the DB using the ADO.NET Model, that you are using in your application.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜