Hi, is it possible to upload a client file to the server by coding? The upload control, saved the client file to the server, before saving other data. In traditional ASP development, we just take the client file from the browser, and while saving (by clicking the save button), we save the given data along with the file attached.
I need just like this. Just get a filename with path (as attachment). When the user clicks the save button, then we move the file from the client to the server along with the saving operation. I didn’t find, this kind of scenario in the entire forum.
If anybody guides me, it would be useful to my project.
Thanks a lot in anticipation.
I attach your sample modified to upload any type of file (text or binary) one level up of bin directory
Also considere validating the target directory each time the app write the file, becaouse another process could delete the upload directory between file uploads
Regards and happy coding
You are writing into /bin causing IIS or IIS Express to reload the application. This is standard behavior, not related to Wisej. Use Application.MapPath() or write somewhere else outside of /bin.
In this upload test project, after the “uploaded event” is fired, the window goes to an ‘offline’ state (it shows the message(popup), at the top of the browser, that it is offline), then immediately the window is refreshed. If you run the project, you can see it. Could you please help me, how to avoid the refresh? FYI: the version I installed is 2.2.48
Herewith I attached the project and the 3 images.
I think you are referring to the Submit action in an HTML page. Wisej is a Single Page Application (SPA) system. There is no submit or post. It’s all ajax. The file is transferred when you pick it (or you can drag & drop it) and it’s up to you to store it somewhere (memory, temp, anywhere) and then do with it whatever the app needs to do. There are several events that give you full control.
There is no auto refresh in Wisej.
Hi, herewith I have attached two image files. In the first image, there is one Upload Field and 3 other input fields (text boxes). What I want is. here the user selects a file (client-side) in the upload filed, and he can enter any data on the 3 fields. While saving the form data, by hitting the save button, the textboxes’ data are moved to the database and finally, the client-side file would move to the server.
But, as per the second image, the client-side file is moved to the server in the “uploaded event”, by using the “SaveAs” function, that is before saving the form data. So, instead of doing it in the “uploaded event”, I want to do the same operation in the save button’s click event (while saving along with other form data)
Is it possible?
And, after the “uploaded event” is fired, the form is auto-refreshed and the data in the text boxes are reset. How to avoid the auto-refresh, after the “upload event” is fired?
Wisej doesn’t save anything on the server automatically. It’s always done by your code and it’s the same ASP.NET classes. If you want to send a sample showing what you need or the traditional ASP sample that does what you need we can help you further.
Please login first to submit.