I have a file loader through which I view the file and strore the name of the view file in a string variable. now I want to rename this uplaod file name with a different name that is stored in another string variable
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);
strRoleValue this variable contains the name that I want to use with to rename the file downloaded through the file. filename is loaded using the file upload control stored in strfilename . so before saving this file in the specified folder I want to rename it with the value strRoleValue. how can i achieve this help .. plz
shweta
source share