tags:

views:

192

answers:

4

I have a file upload control without upload button & a label in a page. I want to display the content of file upload control in that label just after browsing the file upload control.I want to do this without help of AJAX.So how to do this ? Can anyone kindly help me ? Please write the code using C# language not in VB.

A: 

The content - do you mean the filepath or the contents of the file?

Paddy
I mean the filepath.Please help me brother.
Just after browsing you will be on the client side, so I think you'll want to do this with javascript rather than a server side language.
Paddy
So,please tell me how to do this with javascript.
A: 

So,please tell me how to do this with javascript.

A: 
Basilevs
Sorry,friend this code doesn't satisfy my criteria,because u r using a button.My need is that "no buttons should be used".
This code doesn't use the button.
Basilevs
A: 

The filepath isn't exposed through JavaScript (certainly not in the most recent versions of browsers). This is a security feature of the language.

Zhaph - Ben Duguid
So how to do it ???????
I don't think you can. You'd need to use AJAX to post the form back to the server, and return the image through a url - possibly using an HttpHandler or similar.
Zhaph - Ben Duguid