开发者

How to upload csv file into server memory for passing it?

I have SCV file, and i want to insert records from that file in to database, i do开发者_开发百科nt wan to store/upload this file on server hard drive, i want to just parse this in memory and insert records in to database how can i do it in asp.net mvc 3.0?


Just copy it into a memory stream:

if (Request.Files.Count == 1)
{
    System.IO.MemoryStream memStream = new System.IO.MemoryStream();
    Request.Files[0].InputStream.CopyTo(memStream);
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜