title: asp.net mvc HttpPostedFileBase getting file extension
body: <pre><code>public string ContructOrganizationNameLogo(HttpPostedFileBase upload, string OrganizationName, int OrganizationID,string LangName)
      {
           var UploadedfileName = Path.GetFileName(upload.FileName);
          string type = upload.ContentType;
      }
  </code></pre>
  
  <p>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?</p>