返回首页

专业人士的推崇

希望大家都很好。我想实现一个JavaScript模块,在这里我可以检查图像文件的尺寸,
被选中的图像文件的asp.net文件上传控制客户端。
源代码是

ASPX部分。

<asp:FileUpload ID="FileUpload1" runat="server" ClientIDMode ="Static" />

aspx.cs部分。
{C}
JavaScript的部分是

 

<script type="text/javascript">

        function CheckFileDimension() {

            var Uploader = document.getElementById("FileUpload1");

            var uploadedImage=Uploader.value;

            alert(uploadedImage); // This only shows the image file name not the //full path, I want to get the full path of the image and get the  dimension of //the image

        

         

            

        }

    </script>


如果有可能在javascript然后我在这方面的指导。如果不是在C#中如何检查了影响之前保存该图像的输入流,在服务器端。如果图像是确切的尺寸,然后我将文件保存到服务器,否则我会要求用户精确的尺寸。

回答

评论会员: 时间:2