if (fileup.HasFile) { file = fileup.FileName; bool ans = checkFileExtension(file); if (ans) { try { fileadd = (Server.MapPath("Image\\") + txtMulShortName.Text + "." + file.Substring(file.LastIndexOf(".") + 1).ToString()); fileup.SaveAs(fileadd); } catch (Exception ex) { } locLogo.ImageUrl = "~/Image/" + txtMulName.Text + "." + file.Substring(file.LastIndexOf(".") + 1).ToString(); } else { msgmulliteral.Text = "Invalid file type of Logo, select only JPG files"; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)