Thursday, 11 June 2015

Uploaded File,Image Extension Show Using JQuery Asp.Net C#

Uploaded File or Image Extension Show


Image,File Extension Get During The Uploading Time  Display alert Message or Label  Using JQuery  Asp.Net C#.

                                DEMO




                     Download Coding

                                          Download

                        HTML CODING

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
    <script lang="javascript">

        function GetExtension() {                  
            var Extension = $("#FileUpload1").val().split('.').pop();        
            if (Extension != '')
            {
                alert(Extension);
                var label = document.getElementById('<%=Label1.ClientID%>');
                label.innerHTML ="Extension= "+Extension;
            }           
        };         

    </script>
</head>
<body>
    <form runat="server">
    <div>        
       <asp:FileUpload ID="FileUpload1" runat="server" onchange="GetExtension()" />      
        <asp:Label ID="Label1" runat="server" ForeColor="#FF0066"></asp:Label>
    </div>
        </form>
</body>

</html>












0 comments:

Post a Comment