Apr 22, 2013, 7:18 PM
[CLOSED] How to show and Hide mask while saving file to local?
Hi,
As per requirement, I have to compile two to three files and download that compiled file to local machine. While doing this I have to show mask and needs to hide after complete the process. I have implemented small example as given below. The path of compiled file is given directly. Please replace it with your file local path and run it. While clicking on "Save to Local" the mask is showing up, but not hiding.
Can you please let me know how to implement the mask for this?
As per requirement, I have to compile two to three files and download that compiled file to local machine. While doing this I have to show mask and needs to hide after complete the process. I have implemented small example as given below. The path of compiled file is given directly. Please replace it with your file local path and run it. While clicking on "Save to Local" the mask is showing up, but not hiding.
Can you please let me know how to implement the mask for this?
<%@ Page Language="VB" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
End Sub
Public Sub SaveToLocal(ByVal sender As Object, ByVal e As DirectEventArgs)
Dim sMergeFile As String = "C:\TempDir\DocToPDF.pdf"
Response.ContentType = "application/pdf"
Response.AppendHeader("Content-Disposition", "attachment; filename=ImageInfo.pdf")
Response.TransmitFile(sMergeFile)
Response.End()
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager ID="resMngr" runat="server" />
<ext:Button ID="btnDownload" runat="server" Text="Save To Local">
<DirectEvents>
<Click OnEvent="SaveToLocal" IsUpload="true">
<EventMask ShowMask="true" Msg="Saving..." MinDelay="1000" />
</Click>
</DirectEvents>
</ext:Button>
</form>
</body>
</html>
Last edited by Daniil; Apr 23, 2013 at 11:27 AM.
Reason: [CLOSED]