protected void UploadButton_Click(object sender, EventArgs e) { if (PosterUpload.HasFile) { PosterUpload.SaveAs(@Properties.Settings.Default.PosterDir + PosterUpload.FileName); UploadState.Text = "File Uploaded: " + PosterUpload.FileName; Session["fileName"] = PosterUpload.FileName; } else { UploadState.Text = "No File Uploaded."; } }
//protected void set_fileName(string name) //{ // fileName = name; //} protected void UploadButton_Click(object sender, EventArgs e) { if (PosterUpload.HasFile) { //string value = ConfigurationManager.AppSettings["PosterDirectory"]; //string t = Properties.Settings.Default.PosterDir; PosterUpload.SaveAs(@Properties.Settings.Default.PosterDir + PosterUpload.FileName); UploadState.Text = "File Uploaded: " + PosterUpload.FileName; //set_fileName(PosterUpload.FileName); Session["fileName"] = PosterUpload.FileName; //if( PosterUpload.FileName.ToString() != "" ) // fileName = PosterUpload.FileName.ToString(); } else { UploadState.Text = "No File Uploaded."; } }