title: Rename file in c#.net when its is uploaded through file upload control and save chang name of file in database
body: <p>I have file uploader through which i browse file 
  and strore the name of of browse file in string variable .
  now i want rename this uplaod file name with another name which stored in another string variable</p>
  
  <pre><code>string strRoleValue = ddlrole.SelectedValue;
  
   string strfilename = FileUpload1.FileName;
   string existpath = Server.MapPath("~\\JD\\");
   DirectoryInfo ObjSearchFile = new DirectoryInfo(existpath);
    string saveLocation = existpath + strfilename;
  FileUpload1.SaveAs(saveLocation);
  </code></pre>
  
  <p>strRoleValue  this variable contains the name with which i want use to rename a file uploaded through fileupload.
  filename uploaded through fileupload control stored in <code>strfilename</code>.
  so before saving this file in specified folder
   i want to rename it with strRoleValue  value.
  how can i achieve this..plz help</p>
  
  <p></p>