asp.net + multiple file upload to database RRS feed

  • Question

  • Hi,

    We are using asp.net 2.0 with c#. 2.0 have a file upload control which uploads only 1 file at a time. I understand that and I am OK with providing 4 upload controls since user will only have 4 pdf files to upload. In code behind, I will be using HttpFileCollection  to get to the file. My concern is I can send 1 file at a time to database. So, in code behind I need to make a database call 4 times to insert 4 files. Which I am not convinced appropriate to do.

    We have similar situation in using grid. But what we are doing is creating xml for all updated rows and sending xml one time to database, where it loops thru xml in stored proc and inserts or updates the transactions in a table. I don't think I can apply same strategy because files are bytes and will be getting stored in blob field.

    I appreciate if someone can suggest something to avoid multiple roundtrips to the database.



    • Moved by Eyal Solnik Wednesday, February 12, 2014 1:40 AM Irrelevant to C#
    Tuesday, February 11, 2014 8:34 PM


  • Hello,

    ASP.NET topics should be posted at forums.asp.net not in the C# forum, so please post your question there.

    Regards, Eyal Shilony

    • Proposed as answer by Just Karl Wednesday, February 12, 2014 7:11 PM
    • Marked as answer by Just Karl Sunday, February 23, 2014 3:40 AM
    Wednesday, February 12, 2014 1:39 AM