is there a way i can optimized this code and make this extensions on web.config settings so i can read from there and in future if i need to add or remove i should be able to do easily?
if (fileExt.ToLower() == ".rtf" ||
fileExt.ToLower() == ".xls" ||
fileExt.ToLower() == ".doc" ||
fileExt.ToLower() == ".png" ||
fileExt.ToLower() == ".gif" ||
fileExt.ToLower() == ".txt" ||
fileExt.ToLower() == ".jpg" ||
fileExt.ToLower() == ".pdf" ||
fileExt.ToLower() == ".htm" ||
fileExt.ToLower() == ".html" ||
fileExt.ToLower() == ".rar" ||
fileExt.ToLower() == ".zip")
{