hello to all...i am making an asp.net web application...i have an control that is file upload..
when i click on browse and select it, it upoads..now i wants that after upload that file upload
control will become disable and delete button should become visible so that in the case if i want to
cancel that file i will click on delete..
how will it happen..
CrishPosted Jun 10, 2010, 9:57 AM
do below code for your solution
if (FUpload.HasFile == true)
{
FUpload.SaveAs(FilePath + NewFileName);
FUpload.visible = false;
btnDelete.visible = true;
}
on click of delete button
FileInfo NewFilePath = new FileInfo(Server.MapPath("~/ProductImagesfolder/" + imagename.jpg));
if (NewFilePath.Exists)
File.Delete(NewFilePath.ToString());
thanks
Don't forget to Mark Do you like this Answer
that solved your problem!