asp.net - "Visible" is true, but it not working -


this code:

string result = backup.backupdatabase(folder, filename); if (result == "complete") {     backupsuccessfullylbl.text = "backup created successfully.";     backupsuccessfullypnl.visible = true;     if (backupplacerbl.selectedindex == 1)     {         var file = new system.io.fileinfo(folder + filename);         response.appendheader("content-disposition", "attachment; filename=" + file.name);         response.appendheader("content-length", file.length.tostring());         response.transmitfile(file.fullname);     } } 

by default "visible" of "backupsuccessfullypnl" false.

i have created back-up db, have showed successfull message.

i want download created file, if backupplacerbl.selectedindex == 1.

when backupplacerbl.selectedindex != 1, "backupsuccessfullypnl" shown perfectly. when file downloaded, panel not visible. wrong?

transmitfile take full control of response.

so although set true visibility of control , output response file downloaded. that's why dont see changes.

so can do?

great.

you create iframe hosts page has code of downloading file(only).

and on main screen(page) can set visible=true.


Comments