在更新面板中的下载框外观之后隐藏旋转图像. [英] Hiding spining image after the download box apperaence in update panel.

查看:95
本文介绍了在更新面板中的下载框外观之后隐藏旋转图像.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我仍然受到这个问题的困扰,在下载框出现在屏幕上之后,我的进度图像没有被隐藏.我正在使用更新面板和更新进度.我是否需要将更新面板放回去以隐藏图像?这样做会导致下载框消失???我不确定 .请帮帮我.

这是我的HTML标记,用于更新面板和更新进度.:

Hi,
I am still suffering from this problem where my progress image is not getting hide after the download box appears on the screen. I am making use of update panel and update progress. Do I need to make my update panel a post back to hide the image ? Doing so will cause download box disappear ??? I am not sure . Please help me guys.

Here is my HTML mark up of the update panel and update progress.:

<pre lang="HTML">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                <ContentTemplate>
                                    <asp:Button ID="btnDownload" runat="server" CssClass="Admin_Button" OnClick="btnDownload_Click"
                                        Text="Download" Width="91px" UseSubmitBehavior="False" />
                                </ContentTemplate>
                            </asp:UpdatePanel>
                            <asp:UpdateProgress ID="updProgress" AssociatedUpdatePanelID="UpdatePanel1" runat="server">
                                <ProgressTemplate>
                                    <img alt="progress" src="images/indicator.gif" height="30px" width="30px" />
                                    Processing...
                                </ProgressTemplate>
                            </asp:UpdateProgress>





protected void btnDownload_Click(object sender, EventArgs e)
   {
 lblMsg.Visible = false;
                     lbl_date_error.Visible = false;
                     strHSCODE = Convert.ToString(ViewState["strHSCODE"]);
                     strDataType = Convert.ToString(ViewState["strDataType"]);
                     strCombination = Convert.ToString(ViewState["strCombination"]);
                     strProd = Convert.ToString(ViewState["strProd"]);
                     strProd_not = Convert.ToString(ViewState["strProd_not"]);

                     DataTable iResult = bl_my_account_client.Query_Data(strDataType, date_from_by_user, date_to_by_user, strHSCODE, strCombination, strProd, strProd_not);


                     if (iResult.Rows.Count != 0)
                     {
                         HttpContext.Current.ApplicationInstance.CompleteRequest();
                         this.Page.ClientScript.RegisterClientScriptBlock(GetType(), "JScript1", "hideImage();", true);

                        
                         Session["Download"] = iResult;
                         Response.Redirect("Download.aspx");
                         

                     }
                     else
                     {
                         lbl_date_error.Visible = true;
                         lbl_date_error.Text = "Error: This request cannot be processed ...";
                     }
}


我正在下载csv文件frfom数据库


I am downloading a csv file frfom database

Do i need to make use of javascript in order to hide that spining image after my process completes ???

推荐答案

嗨...
好吧,我设法使用以下链接自己解决了这个问题:

Hi...
Well somehow I managed to solve it myself by using following links:

http://www.etechplanet.com/blog/downloading-file-using-aspnet-and-c.aspx
http://www.etechplanet.com/blog/downloading-file-using-aspnet-and-c.aspx



所以无论如何,thanx谁愿意为我试一试.
谢谢Guyz



So anyways thanx who thot to give a try for me.
Thanx guyz


这篇关于在更新面板中的下载框外观之后隐藏旋转图像.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆