Posted on: 12/17/2015 7:49:49 AM | Views : 1223

Hi. I have JavaScript function to resize image. I have also codebehind to upload for image from FileUpload and not from JavaScript function image. But how to call JavaScript function into CodeBehind, that it would be possible to upload resized image instead of to upload from FileUpload the original image.
<script src="ImageTools.js" type="text/javascript"></script> <asp:FileUpload ID="imgUpload" runat="server" /> <asp:Image ID="Image1" runat="server" ImageUrl="~/images/info.png"/> <asp:Image ID="preview" runat="server" /> <script> document.getElementById('imgUpload').onchange = function(evt) { ImageTools.resize(this.files[0], { width: 320, // maximum width height: 240 // maximum height }, function(blob, didItResize) { // didItResize will be true if it managed to resize ...

Go to the complete details ...