Is it possilbe to create temp files and images in asp.net applications using something like this:

If no, how can i do it? (ImagePB is a previously treated Bitmap)

if (System.IO.File.Exists(System.IO.Path.GetTempPath() + @"img" + imgID.ToString() + "PB" + extencao) == true)
{
    try
    {
        System.IO.File.Delete(System.IO.Path.GetTempPath() + @"img" + imgID.ToString() + "PB" + extencao);
        imagePB.Save(System.IO.Path.GetTempPath() + @"img" + imgID.ToString() + "PB" + extencao, imgFormat);
    }
    catch (Exception)
    { }
}
Edit
Report