well i figured it out. I placed a timer in my HTML code and the progress bar hides after the download is completed
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<asp:Timer ID="Timer1" runat="server" Interval="2000" />
</ContentTemplate>
</asp:UpdatePanel>
Honestly I dont know why its working. Maybe someone can explain why.