[SOLVED] Select File From Client

Answered
0
0

Hi,

I have read the forums on the OpenFileDialog topic, but I can not solve my problem.
I need to select a file from the client.
I saw that I can use the Upload control but to display the dialog I have to click on the control.
Instead, I need to open the dialog when I click on an item menu. Is it possible to do this?

Thank in advance

  • You must to post comments
Best Answer
0
0

OpenFileDialog or any dialog or any javascript code cannot browse files on the client. The OpenFileDialog can browse files on the server, or on any file system that your application can provide, see OpenFileDialog.Roots.

There is only one way in any browser to open a client side browser OS dialog – through the upload input element. Additionally, you cannot simulate a click on the element because all browsers block any event that is not directly initiated by the user.

You can create a hidden upload control and then call this.upload1.Call(“upload”). Some browsers may block you, in which case you need to handle the client on the client side using the JavaScript extender or the new ClientEvents in Wisej 2.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.