I'm uploading a file using this code:
WebClient myWebClient = new WebClient();
byte[] responseArray = myWebClient.UploadFile(string.Format("http://{0}/WebApplication/Default.aspx", this.WebServerName), "POST", filePath);
I receive the file in Page_Load()
:
foreach (string f in Request.Files.AllKeys)
{
HttpPostedFile file = Request.Files[f];
Utils.ProcessUpload(file);
Response.Status = "success";
}
I would like to read the status from responseArray
so I can make a decision based on the uploads status. I'm not figuring out how to get the Status
from the responseArray
.
EDIT: The example here doesn't provide much help. it does display the response array