string fileAdres = Server.MapPath(”.”) + “/uploads/” + fluploadFile.FileName.ToString();
if (fluploadFile.HasFile && fileControl(fileAdres.ToString()))
{
fluploadFile.SaveAs(fileAdres);
}
public bool fileControl(string fileName)
{
string uzanti = System.IO.Path.GetExtension(fileName);
if (uzanti == “.exe” || uzanti == “.js” || uzanti == “.vbs” || uzanti == “.asp”) // bu kısım uzar gider
return false;
else
return true;
}