I am trying to set the path for a file upload to a dynamic path. Below is my cod and the error message i receive. It is listing the path correctly, but is not allowing the upload. I think the problem may be with creating the folder for the uploaded file but I do not know how to fix this.
Thank you
.vb
Dim coach As String = "Great Falls - Coach"
Dim school As String = "Great Falls"
Protected Sub Upload1_Click1(ByVal sender As Object, ByVal e As System.EventArgs) Handles Upload1.Click
If FileUpload1.HasFile Then
Try
FileUpload1.SaveAs(Server.MapPath("~\Uploads\" & school & "\1\" + FileUpload1.FileName))
&nb ...
Go to the complete details ...