I created a test asp.net web page using your WenUpload control to load files to server by VS 2010 on Wondows 7 following your instruction on http://ko.infragistics.com/products/aspnet/sample/web-upload/multiple-upload. After updaing reference to jquery-1.8.3.min.js and jquery-ui.min.js (1.8.11), everything looks working from web page - a file added, uploaded to server but I check physical application folder /Uploads, no files are over there. How do I solve this issue? Thanks in advance!
PS: Attached file includes aspx, apx.cs and webconfig files for reference.
I traced client-side event as follows and it also sounds working. Thanks!
Hello Yao,
Thank you for contacting us regarding this matter. In this scenario I would suggest not handling the OnUploadFinishing event as removing the temporary file appears to remove or cancel the saving of the uploaded file altogether. I have contacted our engineers in order to discuss this online sample.
Attached is a test sample using 13.2 and jQuery 1.8.3 or your reference.
Please do not hesitate to contact me if you continue to experience any issues.
Hi Petar,
Thank you for your response. After commenting out the OnUploadFinishing event, the selected file finally can be loaded into Uploads folder. Now I still have more questions for the Webupload control as follows:
1. Clear Uploaded link did not work yet. It just hide the loaded file name from web page if clicked but the file is still in Upload folder physically.
2. At end of my web page there is a Save button to save some information and loaded file's name associated with these information into database. How to get these loaded files name in the ASP.net program, means from which WebUpload property to get loaded file name?
3.In the open pick-up window, Webupload just allow me pick a file not two or more file. Can can highlight more to upload at one time?
Thanks a lot!
Yao
Petar is out for the holidays until tomorrow, Dec 27. He will be able to assist you further when he returns.
If you have any further questions or concerns with this issue, please let us know.
Thank you for your patience.
The "Clear Uploads" button clears only the summary information for the already uploaded files. The button does not delete the uploaded files on the server. The text of this button may be controlled via theLabelClearAllButtonproperty.
http://help.infragistics.com/Help/Doc/ASPNET/2012.1/CLR4.0/html/Infragistics4.Web.jQuery.v12.1~Infragistics.Web.UI.EditorControls.WebUpload~LabelClearAllButton.html
Regarding your second question, I would suggest keeping a serverside Session variable list in order to keep the file names of the uploaded files. Information on the uploaded files may be acquired on the UploadFinished/ing events:
protected void Page_Load(object sender, EventArgs e) { WebUpload2.UploadFinished += WebUpload2_UploadFinished; if (!IsPostBack) { Session["uploadedFiles"] = new List<String>(); } } void WebUpload2_UploadFinished(object sender, UploadFinishedEventArgs e) { (Session["uploadedFiles"] as List<String>).Add(e.FileName); }
Hope this helps. Please do not hesitate to contact me if you have any questions.
Please do not hesitate to contact me if you have any further questions regarding this scenario.
Thanks for your help!
Hi Pelta,
I studied this sample and am trying to revise the codes in my project. If I have a problem I will consult you for help.
In this case you may be interested in using the save as stream capabilities of the WebUpload:
http://help.infragistics.com/doc/ASPNET/2013.2/CLR4.0/?page=WebUpload_Saving_Files_as_Stream.html
An alternative approach for saving files in a database would be to use a temporaray local copy of the uploaded documents prior to pushing them to the DB.
Hope this helps. Please feel free to contact me if you have any questions.
It is perfect working for the WebUpload to upload multiple files to a default file folder \Uploads. Now I try to upload the files and save them to SQL database. Could you give me the idea to the update, usually how to get the file content through stream?
Petar,
I have one more issue when working on my application that I set the WebUpload invisible by its property Visible=false by default within an UpdatePanel. Based on user's selection on radio Button list, one selection needs its showing up by setting WebUpload1.Visible = true in the radio Button event SelectedIndexChanged. The program works without errors but the WebUpload control doesn't show up. Please advice.
Thanks!