asp.net mvc HttpPostedFileBase getting file extension
        Posted  
        
            by mazhar kaunain baig
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by mazhar kaunain baig
        
        
        
        Published on 2010-05-28T13:46:29Z
        Indexed on 
            2010/05/28
            13:51 UTC
        
        
        Read the original article
        Hit count: 322
        
public string ContructOrganizationNameLogo(HttpPostedFileBase upload, string OrganizationName, int OrganizationID,string LangName)
    {
         var UploadedfileName = Path.GetFileName(upload.FileName);
        string type = upload.ContentType;
    }
I want to get the extension of the file to dynamically generate the name of the file.One way i will use to split the type. but can i use HttpPostedFileBase object to get the extension in the clean way?
© Stack Overflow or respective owner