Reputation: 597
i have an update form for some of my data, if user entered an url for my fileupload in database, i want to show this url in fileupload as it's filename in my update form, actually i want have a code like this :
FileUpload1.FileName = "My Path";
of course i know fileName
in a readOnly
property,
could u please help me?
Upvotes: 0
Views: 2811
Reputation: 4809
Its a bad idea since user might not have file in same location or he might have completely deleted it or he may browsing from other machine that results in invalid functionality. However, the file upload value can be set from javascript. If you really intend to do that, store the path in hidden field and in body onload event set the fileupload value to the hidden field value.
Upvotes: 1