Postback of dropped content in HTML5
We have an A开发者_StackOverflow中文版SP.NET MVC3 web application. We generate HTML5 pages.
And now, we would like the dragged & dropped
content (images, word documents...) into the HTML5
page to be sent to the Web Server and then processed (content and MIME type) in C#.
How can this be solved?
They are a lot of tutorial or library that do it with HTML5. Here is one that combine HTML5 and JQuery to upload file to the server with drag-and-drop.
http://gokercebeci.com/dev/droparea
Example of code that you will need to generate from the ASP page.
<div class="droparea spot" data-width="460" data-height="345" data-type="jpg" data-crop="true" data-quality="60" data-folder="sample" data-something="stupid"></div>
<script>
$('.droparea').droparea({'post' : '/data/dev/droparea/upload.php'});
</script>
精彩评论