FileUpload control.

E

Eric

I'm using the fileuploadcontrol for the user to select a file, in this case
a image file.
I would like to see the little preview image to be shown right after
selection, but there seems to be no event from the fileupload control.
To by-pass this I let the user click on a linkbutton to show the preview,
but when the page comes back after the postback, the fileuploadcontrol is
empty again.

Is there an update to this control, giving more events?
Is there a third party control, better then the one shipped with vs2005?
Is there a way to create these events for the fileuploadcontrol?

rg,
Eric
 
I

intrader

I'm using the fileuploadcontrol for the user to select a file, in this case
a image file.
I would like to see the little preview image to be shown right after
selection, but there seems to be no event from the fileupload control.
To by-pass this I let the user click on a linkbutton to show the preview,
but when the page comes back after the postback, the fileuploadcontrol is
empty again.

Is there an update to this control, giving more events?
Is there a third party control, better then the one shipped with vs2005?
Is there a way to create these events for the fileuploadcontrol?

rg,
Eric
Once the file is at the server, you can have the server render an
image to the client in thumbnail size width/height.
 
R

ray.bradbury9

First of all, excuse my poor english.

I don't think that is possible, let me explain why. Through Javascript
you cannot access the local filesystem, perhaps setting the IE security
to lowest, but I don't think it could work. As intrader has noticed,
that can be accomplished once the file is in the web server, it is the
best way.

The following code does NOT work.

<script type="text/javascript" language="javascript">
function cargarImagenServer(){
Imagen.src=fileUploader1.value;
}
</script>
<img id="Imagen" alt="Imagen A mostrar" src="" />
<asp:FileUpload runat="server" onclick="cargarImagenServer();"
ID="fileUploader1" />
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top