dvst8
May 31st, 2000, 12:33 AM
boy, i'm really on a tear here with questions....
it seems i hit hang ups all the time, and reference manuals don't really have info on getting around annoying problems.. for that you have to talk to experienced programmers... so here I am, pleading for knowledge...
i only hope i can help others, as much as you guys have helped me..
anyway, on with the question:
I tried to build a simple image broswer in ASP, but couldn't get it working because of a silly detail which I can't work around.
I have a <input type = "file" name = "file1"> field in a form, and I want to make it so that when the user has browsed and located his/her image, the image will be displayed for him on the same page.
I had made a "View" (which was really a type = "submit" button) button beside the file field, and when the user clicked it, the page resubmitted the form to the same page, except this time displaying the specified image.
HOWEVER, then the page reloads the file field comes up blank. Sure I could capture it from the form, but you CANNOT do the following:
<input type = "file" name = "file1" value = "<%=Request.form("file1")%>">
The value will not fill in!!!!! This is by design in HTML spec. You are not allowed to specify the value of a file field.
See my problem?
It's no good having this simple image browser, if when the page reloads, the image comes up, but not the path to the file....
This is very annoying, and I need a work-around!
tx
d8
[Edited by dvst8 on 05-31-2000 at 01:35 PM]
it seems i hit hang ups all the time, and reference manuals don't really have info on getting around annoying problems.. for that you have to talk to experienced programmers... so here I am, pleading for knowledge...
i only hope i can help others, as much as you guys have helped me..
anyway, on with the question:
I tried to build a simple image broswer in ASP, but couldn't get it working because of a silly detail which I can't work around.
I have a <input type = "file" name = "file1"> field in a form, and I want to make it so that when the user has browsed and located his/her image, the image will be displayed for him on the same page.
I had made a "View" (which was really a type = "submit" button) button beside the file field, and when the user clicked it, the page resubmitted the form to the same page, except this time displaying the specified image.
HOWEVER, then the page reloads the file field comes up blank. Sure I could capture it from the form, but you CANNOT do the following:
<input type = "file" name = "file1" value = "<%=Request.form("file1")%>">
The value will not fill in!!!!! This is by design in HTML spec. You are not allowed to specify the value of a file field.
See my problem?
It's no good having this simple image browser, if when the page reloads, the image comes up, but not the path to the file....
This is very annoying, and I need a work-around!
tx
d8
[Edited by dvst8 on 05-31-2000 at 01:35 PM]