title: How to save uploaded file in different name with actual physical path in asp.net?
body: <p>i have a file upload in my code. I want to save that file in different name (i.e patient id + timestamp) but i could not save the uploaded file in actual physical location. its shows format is not correct.</p>
  
  <p>here location and deptcode taken from session.and mainpath is taken from variable defined in web.config. thats base path. from that base path i am creating sub folders is its not there and then have to save uploaded file in different name. values are all correct.even i could create subfolders if its not there ,but only problem is saveas line. i cannot save uploaded file.
  here if i use SaveAs(Server.MapPath(..)) it shows u should use virtual path.
  if i use only saveas(filelocation) then it shows format is wrong..please help me..</p>