Trying to use a file upload, in c# like I've done a gazillion times before, but in this little page, with an update panel, my code won't work. Throws this crazy little IE err. Any idea what I'm doing wrong?
protected void btnUpload_Click(object sender, EventArgs e)
{
System.IO.DirectoryInfo d = new System.IO.DirectoryInfo(Convert.ToString(HttpContext.Current.Application["directory"]) + "\\abc");
dynamic newDir = d.CreateSubdirectory(Request.QueryString["8675309"]);
HttpFileCollection uploadedFiles = HttpContext.Current.Request.Files;
int i = 0;
while (!(i == uploadedFiles.Count))
{
HttpPostedFile userPostedFile = uploadedFiles[i];
{
string g = System.Guid.NewGuid().ToString("N");
if ((userPostedFile.ContentLength > 0))
{
userPostedFile.SaveAs((newDir.FullName) + "\\" + ((g.ToString())) + ...
Go to the complete details ...