Rank: Advanced Member Groups: Member
Joined: 3/18/2008 Posts: 41
|
Hello.
I need to post meta information (plain text) from multiple textfields together with the media files. For example, I need to give the video file a title and meta keywords using text fields, and insert these data into a database while the video file will be stored on disk. Will this be possible using the ajax uploader?
Can you show me an example with C# code?
Regards, HT
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
There is nothing special about that and in fact it is almost always used that way. All you need to do is to put whatever other control (textbox or anything else) in your form along with the AJAXUploader. You would then handle the uploader's FileUploaded event. When the event is triggered, you access those textbox the same way as if you are handling a button click event.
What's special about the uploader is how this is achieved. Uploading the file does not submit the page. They are two separates thing. Considering uploading a file the same as typed a word in a textbox. The uploaded files are transferred to the server but are still sitting in the temp directory. You can delete it, upload more files, etc. Nothing is final until you submit the page (either through the uploader's AutoPostBack property or another control, for example, a submit button). When the page is finally submitted, FileUploaded event is triggered and you will then decide what to do with those files.
Thanks
|