|
-
Jul 19th, 2005, 02:55 AM
#1
Thread Starter
Frenzied Member
Populate a File Type HTML control from database
Hello everybody,
I have a file control in my asp page and on selection of a drop down, I want to fetch records and populate the file path in the file control so that user can see which file has been uploaded and he change the file if necessary. But file control does nothing if I print the data in the value attribute.
Thanks.
-
Jul 19th, 2005, 06:33 AM
#2
Frenzied Member
Re: Populate a File Type HTML control from database
For security reasons you cannot set the value of the file input control. Otherwise it could be used maliciously to upload files off a user computer without their knowledge!
I would suggest you implement a different system. When displaying uploaded images from a database I tend to do the following:
1. If there hasn't been a image uploaded just display the file input control with the label "Upload a new image".
2. If there has been an image uploaded display a thumbnail of the image with the label "Current image". Then display a file input control with the label "Change Image" and finally a button that says "Delete Existing Image" which when clicked deletes the current image stored in the database.
HTH
DJ
If I have been helpful please rate my post. If I haven't tell me!
-
Jul 19th, 2005, 07:17 AM
#3
Addicted Member
Re: Populate a File Type HTML control from database
yup
i do agree with dj4uk. if you want to display user which file has been uploaded just use a set of labels or textboxes, so that the user can change if he wishes.
--Kishore...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|