I use the FileUpload
to upload files.
but i note that :
in the second upload ,the session variables are cleared then log out !!
Why this strange behavior is happened when clicking on save button
?and how to fix it ?
if (fup_logoBannarFile.HasFile)
{
try
{
bool IsExists = System.IO.Directory.Exists(Server.MapPath(path + ddl_dep.SelectedItem.Value.ToString()));
if (!IsExists)
System.IO.Directory.CreateDirectory(Server.MapPath(path + ddl_dep.SelectedItem.Value.ToString()));
upload_file(fup_logoBannarFile, lbl_successMsg, "LogoBanner");
load_images();
}
catch (Exception ex)
{
errorDiv.Visible = true;
successDiv.Visible = false;
lbl_msg.Text = "Upload status: The file could not be uploaded. The following error occured: " + ex.Message;
}
}