This is a migrated thread and some comments may be shown as answers.

RadAsyncUpload With Textbox

5 Answers 182 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Jagat
Top achievements
Rank 1
Jagat asked on 05 Mar 2012, 03:33 AM
Hello,

  On my webpage, I am using RadAsyncUpload and i'd like to have a description for each image the user upload. For that i need a textbox and the user can upload as many images as they want. What would be the best way to achieve this?

Appreciate the help
Thanks

5 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 05 Mar 2012, 05:56 AM
Hello,

Take a look into the following demo which discuss the same.
AsyncUpload / Additional Fields

Thanks,
Princy.
0
aehlert
Top achievements
Rank 1
Veteran
answered on 03 Dec 2012, 03:02 PM
That is a good example for a textbox.

What about if you want to add a drop-down list instead?
0
Princy
Top achievements
Rank 2
answered on 04 Dec 2012, 04:30 AM
Hello,

Try the following code snippet to achieve your scenario.

ASPX:
<telerik:RadAsyncUpload runat="server" ID="RadAsyncUpload1" OnClientFileUploaded="onClientFileUploaded" MultipleFileSelection="Automatic" Skin="Office2007">
</telerik:RadAsyncUpload>

JS:
<script type="text/javascript">
    function onClientFileUploaded(radAsyncUpload, args) {
        var label = document.createElement("label");
        label.innerHTML = "File info: ";
        br = document.createElement("br");
        var row = args.get_row();
        var dropdown = document.createElement("select");
        var opt1 = document.createElement("option");
        opt1.value = 1;
        opt1.text = "First entry";
        dropdown.options.add(opt1);
        var opt2 = document.createElement("option");
        opt2.value = 1;
        opt2.text = "second entry";
        dropdown.options.add(opt2);
        row.appendChild(br);
        row.appendChild(label);
        row.appendChild(dropdown);
    }
</script>

Hope this helps.

Regards,
Princy.
0
aehlert
Top achievements
Rank 1
Veteran
answered on 04 Dec 2012, 09:34 PM
On the server side, how do you refrence the selected value?

I was able to get the data from an input box with something like

var _fileDescription = e.File.GetFieldValue("TextBox")

I could not figure out how to grab the drop-down value.

Thanks for the help!
0
Plamen
Telerik team
answered on 07 Dec 2012, 09:46 AM
Hi Andy,

 
It is not quite clear what are you trying to achieve and which RadControl are you using. Would you please elaborate so we could be more helpful?

All the best,
Plamen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
AsyncUpload
Asked by
Jagat
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
aehlert
Top achievements
Rank 1
Veteran
Plamen
Telerik team
Share this question
or