AjaxControlToolkit.PersistentStoreManager.GetContentType C# (CSharp) Method

GetContentType() public method

public GetContentType ( string controlId ) : string
controlId string
return string
        public string GetContentType(string controlId)
        {
            if(String.IsNullOrEmpty(controlId))
                throw new ArgumentException("controlId cannot be empty", "controlId");

            var currentContext = GetCurrentContext();
            if(currentContext == null)
                return String.Empty;

            var postedFile = currentContext.Session[GetFullID(controlId)] as HttpPostedFile;
            if(postedFile == null)
                return String.Empty;

            return postedFile.ContentType;
        }