[Solved] Error cannot implicitly convert type ‘void’ to ‘string’ on string filepath [closed]


SaveAs doesn’t return a string, or anything else. If you want the path in its own variable,

string filepath = Server.MapPath("~/UploadImages/") + filename;
((FileUpload)row.FindControl("FileUpload1")).PostedFile.SaveAs(filepath);

1

solved Error cannot implicitly convert type ‘void’ to ‘string’ on string filepath [closed]