how to attatch random string to the uploaded file?
i am uploading the file for auto category say xyz.html and the file got saved into mailers folder.
i am again uploading the file for build category say xyz.html(file name is same,contents inside it is different)and the file got saved in mailers folder.
problem is that since the file name is same,it is overiding the file and only one file got saved. So i want some random string attatch to it.
How to achieve it?
filename = Path.GetFileName(filemailerupl.PostedFile.FileName);
filemailerupl.SaveAs(Server.MapPath("~/mailers/" + filename));