So far, I like the WebUpload control. Very sharp.
I want to allow the user to upload an Excel file, use the Infragistics.Documents.Excel library to read the file, and then display the first worksheet in a WebDataGrid.
The file is uploading correctly to the Uploads folder, and I have code in the but the server-side WebUpload1_UploadFinished event, but no postback occurs when the upload completes. The server-side events appear to not be firing at all.
Am I missing something fundamental here? I can't find any documentation on the server events.
Also, it would be super if the "saving to disk" step could be avoided altogether, and just pass the filestream as an argument to the UploadFinished event. That would be ideal.
I need the same sort of pattern after an upload as well but not as complicated as your situation.
For my upload I want to rename the file to a unique name on the server and then push down that unique name to the client along with the original filename. Then when the user hits save the unique file name and the original file name are saved to my database. This will prevent duplicate filename overwrites which are not desirable.
It appears that the only way to do this is to store the unique filenames in a session and then pull them to the client via ajax so the file list on the page is displayed with the file name and the list value is the unique filename.
It would be nice to be able to alter the filename in the server side UploadFinishing event and have that new name and the original name pushed down to the client as event arguments to the onFileUploaded client event. It would save me a bunch of time.
Miro,
I am very much looking forward to seeing the sample code. I can think of several places in my application where I would like to implement the upload control, but I really have to be able to have the page respond to the uploads.
Thank you very much for taking the time to do this!
-Rob
Hi Rob,
For now I will try to prepare one sample that demonstrate this. Also I hope soon we will share such sample in our sample browser.
Thanks,
Miro Hristov
I ended up giving up. This is a terrific example of a scenario where sample code could help a lot of people. I am sure I am not the only person who would like to update other elements of a ASPX page after the upload completes.
Hello Rob,
I hope the information provide from Miro is helpful.
Were you able to handle this?
For any further questions with this matter, do not hesitate to contact us.
Sincerely,
Georgi Sashev
Developer Support Engineer
Infragistics, Inc.
http://es.infragistics.com/support