AsyncFileUpload - Show uploaded file content type in asp.net ajax

Ajax AsyncFileUpload args.get_contentType() - Show uploaded file content type
ShowUploadedFileContentType.aspx

<%@ Page Language="C#" AutoEventWireup="true" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<!DOCTYPE html>
<script runat="server">
    protected void Page_Load(object sender, EventArgs e)
    { 
        if(!Page.IsPostBack)
        {
            Label1.ForeColor = System.Drawing.Color.OrangeRed;
            Label1.Font.Name = "Comic Sans MS";
            Label1.Font.Size = FontUnit.Large;
            Label1.Font.Italic = true;
            Label1.Font.Bold = true;
        }
    }
    protected void AsyncFileUpload1_UploadComplete(object sender, AjaxControlToolkit.AsyncFileUploadEventArgs e)
    {
        string filePath = Request.PhysicalApplicationPath+ "Upload\\" + AsyncFileUpload1.PostedFile.FileName;
        AsyncFileUpload1.SaveAs(filePath);
    }    
</script>
<script type="text/javascript">
    function showConfirmation(sender,args) {
        document.getElementById('Label1').innerHTML = 'upload complete.'+"<br />Uploaded File Content Type: "+ args.get_contentType();
    }
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Ajax AsyncFileUpload args.get_contentType() - How to show uploaded file content type</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <h2 style="color:SaddleBrown; font-style:italic;">Ajax AsyncFileUpload Example: How To Use args.get_contentType()</h2>
        <hr width="625" align="left" color="BurlyWood" />
        <asp:ScriptManager 
            ID="ScriptManager1"
            runat="server"
            >
        </asp:ScriptManager>
        <br />
        <cc1:AsyncFileUpload 
            ID="AsyncFileUpload1" 
            runat="server" 
            OnUploadedComplete="AsyncFileUpload1_UploadComplete"
            OnClientUploadComplete="showConfirmation"
            CompleteBackColor="BurlyWood"
            UploaderStyle="Traditional"
            BackColor="PeachPuff"
            />
        <br />
        <asp:Label 
            ID="Label1"
            runat="server"
            >
        </asp:Label>
    </div>
    </form>
</body>
</html>
Related asp.net ajax examples