ASP.Net Upload, Paste and Save Image to Database (Binary)
1. Image name = " SketchSrc1 " 2. Add a HiddenField to store image string ("hf...") <asp:HiddenField ID="hf SketchSrc1 " runat="server" Value="" /> 3. Add an Image component ("img...") <asp:Image ID="img SketchSrc1 " runat="server" CssClass="img-thumbnail" ImageUrl="~/Images/NoImage.png" Width="260px" Height="260px" Style="max-width: 300px; min-height: 100px; max-height: 600px" /> 4. Add "Upload", "Clear" and "Paste" button for new image ("file...", "clear...") <div> <div id="divImgEd1" runat="server" visible="true"> <input type="file" accept=".jpg, .jpeg" name="image1" id="file SketchSrc1 " onchange="loadFile(' SketchSrc1 ', event)" style="display: none;">