asp.net - Methods for asp:FileUpload object? -


. .

i'm trying set <asp:fileupload> object fire on client side after click "browse" , select file. (specifically, want return name of file selected.)

however, i'm having hard time trying find correct method. none of server-side methods want (and i'd prefer fire on client-side, anyway), , none of various combinations of client-side methods (onclick, onchange, etc.) seem work.

ideas, anyone?

thanks!

edit: think may have answered own question. ended abandoning asp.net <asp:fileupload> tool, , used lower-tech <input type="file"> instead. methods seem work fine that.

edit #2: nothing doing. works fine on client side, have problem of trying save file on server side. guess it's square 1.

edit #3: think final answer. changed <asp:fileupload id="fileuploader"> , added fileuploader.attributes.add page_load. sees , fires no problem. of course, i'm getting "object expected" error (because script it's calling comes after code -- ah, joys of dealing javascript order).

as mentioned in edit yesterday -- answer ended being add attributes in page_load. let's fileupload id "fileuploader". added fileuploader.attributes.add("onchange","callthiscode();"). did trick!

now need figure out how make call javascript correctly -- different issue altogether! :-)


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -