doc file download c# enabling buttons

135 views Asked by At
 protected void btnPrint_Click(object sender, EventArgs e)
{
 Response.ContentType = "Application/doc";
 Response.AppendHeader("Content-Disposition", "attachment;filename=xyz.doc");
 Response.TransmitFile(Server.MapPath("~/x/xyz.doc"));
 Response.End();
 btnProceed.Enabled = true;//not working
}

The server side control attributes are not working in this code block.How to enable a button as in this case upon the file download completion inside the same code block.

1

There are 1 answers

2
PepitoSh On

After download you either have to reload the page that initiated the download, use an UpdatePanel to do the update, or use some javascript magic to do it on the client side altogether.