Click here to Skip to main content
15,885,435 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hey guys, I have this code:

<div>
            <ajaxToolkit:AsyncFileUpload />
            <%--<asp:Image ID="imgLoader" runat="server" ImageUrl="~/images/loader.gif" />--%>
            <asp:Label ID="lblMesg" runat="server" Text=""></asp:Label>
            <asp:Button ID="submit" runat="server" Text="SUBMIT REQUEST" OnClick="submit_Click" OnClientClick="submit_Click" />
        </div>


What I want is to be able to get the value of the uploaded file and be able to save it into a DB with the correct format which i think is image but not sure any ideas?
Posted
Comments
jaket-cp 23-Jan-15 8:16am    
http://lmgtfy.com/?q=save+image+to+database+c%23
http://www.codeproject.com/Articles/33310/C-Save-and-Load-Image-from-Database
ZurdoDev 23-Jan-15 8:28am    
An alternative is to save the image to disk and then store the path in the db.
[no name] 23-Jan-15 9:04am    
This is an alternative, but tricky to stay consistent. Especally when one needs to migrate and forget the files...
ZurdoDev 23-Jan-15 9:10am    
I find some things much easier with this approach. But there are things that are less easy too. Always more than one way to do things and there are always tradeoffs.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900