Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to hold invoke post Action result from jquery while upload images?
    primarykey
    data
    text
    <p>Uploading file by file is running Correctly in my code sample but i want to hold post action while entering another data fields to enter in my Database from inputs , Text etc. how to control this from post action or how to hold dragged images into object while press button submit and so goto post Actionresult?</p> <p>This is Controller:</p> <pre><code> [HttpPost] public ActionResult UploadFiles(IEnumerable&lt;HttpPostedFileBase&gt; files) { if (!Directory.Exists(Server.MapPath("~/TempImages/")) || files !=null) { string TempPath = Server.MapPath("~/TempImages/"); foreach (HttpPostedFileBase file in files) { string filePath = Path.Combine(TempPath, file.FileName); System.IO.File.WriteAllBytes(filePath, ReadData(file.InputStream)); file.SaveAs(filePath); } } return Json("Successfully Uploaded ."); } private byte[] ReadData(Stream stream) { byte[] buffer = new byte[16 * 1024]; using (MemoryStream ms = new MemoryStream()) { int read; while ((read = stream.Read(buffer, 0, buffer.Length)) &gt; 0) { ms.Write(buffer, 0, read); } return ms.ToArray(); } } </code></pre> <p>Update:</p> <pre><code> &lt;script src="~/Scripts/jquery.filedrop.js"&gt;&lt;/script&gt; &lt;script src="~/Scripts/jquery.filedrop.support.js"&gt;&lt;/script&gt; </code></pre> <p></p> <pre><code>&lt;h2&gt;File Drag &amp; Drop Upload Demo&lt;/h2&gt; &lt;div id='dropbox'&gt; &lt;span class="message"&gt;Drop images here to upload. &lt;br /&gt;&lt;i&gt;(they will only be visible to you)&lt;/i&gt;&lt;/span&gt; </code></pre> <p></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload