how to set value to htmlinput control(type = file)
-
hi, i've browse option using if i write code txtoutputpath.value = "c:\aspfile.txt" then compiler give error but i want set a value to 'txtoutputpath' but i cant do it . how can set value to 'txtoutputpath' thnks in advance
-
hi, i've browse option using if i write code txtoutputpath.value = "c:\aspfile.txt" then compiler give error but i want set a value to 'txtoutputpath' but i cant do it . how can set value to 'txtoutputpath' thnks in advance
I don't think you can set a value of a file input. It doesn't work that way, the user has to post a file. "People who never make mistakes, never do anything." My Blog
-
I don't think you can set a value of a file input. It doesn't work that way, the user has to post a file. "People who never make mistakes, never do anything." My Blog
thanx. i'm using asp.net using lang=vb.net then does any control/component available in asp.net ?
-
I don't think you can set a value of a file input. It doesn't work that way, the user has to post a file. "People who never make mistakes, never do anything." My Blog
As ToddHileHoffer said, and in some other message this was discussed before. If you make a post, and then you find there's something wrong in the form, and then you return to correct the problem, the file input won't hold it's 'value' (the path to the file) so what you need to do, is have this file selection until you have everything validated. daniero
-
thanx. i'm using asp.net using lang=vb.net then does any control/component available in asp.net ?
No, there isn't. There is only one field in html that does file uploads, and there is no way at all to set the value of that field. You can't do it using server code, you can't do it using html, and you can't do it using javascript. --- b { font-weight: normal; }