Web.zipI am working on the module that does upload data, without storing file on the server, in the WebForm environment utilizing WebUpload control. In general it is working..
Have several questions:1.I am getting texts on the buttons as following : after load I see "Upload File" then "Upload" and after it done - "Add" .... How do I change text on them ?
2. I added <div id="uploadErrors" style="color: red;"></div> and <AllowedExtensions>, when I am trying to add file with wrong extension it does not show upload button but it does not show error message in red either.. How to make message visible
3. How to make Clear Upload button visible.
4. In the document on the site there is following example adding server events :
<system.web><pages><add tagPrefix="igjq" namespace="Infragistics.Web.UI.EditorControls"assembly="Infragistics.Web.jQuery"/></pages></system.web><igjq:WebUpload ID="webUpload1" runat="server"OnUploadFinishing="webUpload1_OnUploadFinishing"OnUploadFinished="webUpload1_OnUploadFinished"OnUploadStarting="webUpload1_OnUploadStarting"></igjq:WebUpload>
On the other hand I just added protected void WebUpload1_UploadFinishing(object sender, Infragistics.Web.UI.EditorControls.UploadFinishingEventArgs e) and it is working, what is the difference ?
Files added for references, please show fixes in FileUpload01when possible...
FileSelecting
Hi Stamen.. FileSelected works fine. Thanks for your help.
Hello Michael,
I am sorry for the delayed response!
I had to dig in a bit deeper but you are right, the FileUploading event cannot really be used to cancel uploads on user request as it is fired during the uploading progress, after the request has already been made. It could work for larger files where the user has some time to decide but it's overall better to use FileSelected.
Alternatively, if FileSelected doesn't meet your UX requirements, I can create a workaround hijacking the click event on Upload button so that you can hook to it. Let me know if you prefer that.
Best regards,
Stamen Stoychev
I guess if nothing else, like attach somehow click event to the uploadStart button (2nd phase), I can put confirm to FileSelecting event..
Hello, thanks for your help.. the work around seems working.. but here is another issue beyond it..
Here what I am doing : I am picking up excel spreadsheet and processing it in WebUpload1_UploadFinishing on the server where it is available as a Stream (e.FileStream), Processing includes back end update.. all works well right inside WebUpload1_UploadFinishing server event...
Here is the problem: Before starting Upload I need to warn user that the process wiping out existing data and give him a choice to proceed or cancel.. and to that end I though to use WebUpload1_FileUploading on the client which is supposed to be cancellable.. and for that I used confirm prompt with approach that you advised.. The issue is when confirm prompt is raised, it does not matter if I choose ok or cancel because at that point WebUpload1_UploadFinishing and WebUpload1_UploadFinished are both fired and executed already and database is updated and confirm request does not make any sense.. Any advise how to interrupt process so user can cancel upload before it happened... Attaching latest version of my sample file.. it is running version, if you can show how to deal with this issued in it.
Thanks.
4478.FileUpload01.aspx.zip