How to Implement a Browse Button in asp.net WebApplication

C

conckrish

Hi all,

This is all about ASP.NET WEB APPLICATION...

I have a Button and when i click that button... i need to open the File
Dialog through Which i have to select the Image Path...

And When i press the OK Button of the File Dialog ..... i have to get
the File name selected and set it as TextBox Text and also Show Image
Preview...

Is it possible to implement Browse button in ASP.NET WEB
APPLICATION........

I have used

<input type:file> for selecting the Image Path but could not get the
File Path and Show the PReview Display from it....

Can any One Please help me How to solve this...

Its Urgent.........
PLZ REPLY

Thanks in Advance...

Sanjay.C
 
P

Patrice

AFAIK you can't. Though you could perhaps tweak security I believe that
starting with SP2, a web page can't access all local resources even if this
could be considered safe (such as having a src attribute that points to a
local file).

What have you trieed that doesn't work ? (My first thought would be to set
the src attribute of an img tag to the selected file but I believe it won't
work if the file is local, an easy solution if small files would be to
upload the file to the server so that the resource is not local any more).
 
A

Amrit

hi! this is amrit.
sameproblem washappening with me as i also develop applicationsin
asp.net using vb.net.
what you can do for this is you can place a hidden field on for the
html controls toolbox,
and then you have to load that URL in that hidden field bvefore loading
it to the image control.

then lateron, you can access that url.
But the problem that i was facing was that i have to load 5 pics at a
time and using 10 hidden fields in form is not a good practice.


take care
have a nice stay..
(e-mail address removed)
(e-mail address removed)
 

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

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top