RadAsyncUpload With Textbox

6 posts, 1 answers
  1. Jagat
    Jagat avatar
    119 posts
    Member since:
    Jan 2011

    Posted 04 Mar 2012 Link to this post

    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

  2. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 04 Mar 2012 Link to this post

    Hello,

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

    Thanks,
    Princy.

  3. aehlert
    aehlert avatar
    6 posts
    Member since:
    Aug 2007

    Posted 03 Dec 2012 Link to this post

    That is a good example for a textbox.

    What about if you want to add a drop-down list instead?

  4. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 03 Dec 2012 Link to this post

    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.

  5. aehlert
    aehlert avatar
    6 posts
    Member since:
    Aug 2007

    Posted 04 Dec 2012 Link to this post

    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!

  6. Plamen
    Admin
    Plamen avatar
    2293 posts
    Member since:
    Jul 2012

    Posted 07 Dec 2012 Link to this post

    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.

Back to Top