Main menu:

 

August 2008
M T W T F S S
« Jul   Sep »
 123
45678910
11121314151617
18192021222324
25262728293031

Site search

Archives

Categories

Tags

Links:

asp fileupload control..unable to display the text from the database

I added an asp file upload control and was trying to upload the image successfully..cool.

i am adding the location of the image in the columns of a sql server table ~/yourwwwlocation/yourimagefolderlocation

now when I load the page to edit i need the ~/yourwwwlocation/yourimagefolderlocation in the file upload text box, well, i was unable to set the as its a read only property.. fileupload.postedfile = “read only doesnt work”;

well the work around was to add the hidden field on the page and then in the code behind writing the logic to find

whether the database table column has a location text in it,

if it has, pass it as it is., dont process

and if the database table column has a text and u are trying to upload a new file..

then check whether the hidden value matches with the new value..

if it doesn’t process(upload it) .

if there is nothing in the database field and its new upload,( hidden value = “”)

it will upload

Hope this helps…

Write a comment





Currently you have JavaScript disabled. In order to post comments, please make sure JavaScript and Cookies are enabled, and reload the page.