Rad Upload disappears after uploading images

Thread is closed for posting
2 posts, 0 answers
  1. Amit Kothari
    Amit Kothari avatar
    5 posts
    Member since:
    Aug 2009

    Posted 23 Dec 2009 Link to this post

    I have one single page, in that all the application in terms of user control will get loaded dynamically. [By calling the LoadControl method]
    On one controls I have some rad tab and their page view which also get loaded dynamically to the user control.
    After clicking on one tab the images section comes up, where one can see the listing [ in  RadListView]
    and can upload the images as well.
    This is what I have done :
    <telerik:RadUpload Localization-Select="Browse" ID="RadUpload" runat="server" ControlObjectsVisibility="AddButton"
                            MaxFileInputsCount="5" />
    I am saving the images to database, but before that I had to disable the ajax, to post the file. For that I had to use this Line of code : StringBuilder js = new StringBuilder();
                js = js.Append("function conditionalPostback(sender, args){");
                js.Append("if (args.get_eventTarget() == '" + buttonSubmit.UniqueID + "') {alert('hi');");
                ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "UploadScript", js.ToString(), true);
    I have tried the same js in the aspx page with the RadCodeBlock but its not working. Anyways the main problem is after uploading images first time the file input text area and the browse button got disappears, but the add and upload button remains there.
    I have tried it very hard but of no luck...
    Please help

    Also i thought of another way to reload the whole control again after the post back that way the upload control should treat like it has come first time, but at that time after the postback, if I want to upload more images the RadUpload.UploadedFiles returns the count 0 [Seems like my js has not effected this time]

    Please help

    One more thing, I have missed above is this string "RadUrid=b086b64a-9a52-4bc3-8a63-5e7565d731ea " gets appended to my url, after the upload image action very first time. Im not sure what is this. And I want to get rid of this as well.[One minor item]. Please help, its urgent. [Client wants to look at this at the earliest ]

  2. Schlurk
    Schlurk avatar
    812 posts
    Member since:
    May 2009

    Posted 23 Dec 2009 Link to this post

    I think disabling Ajax is what might be causing the text field and browse button to disappear. I haven't uploaded directly into a database, but I believe that you should still be able to save it to the DB without disabling Ajax.

    As for your RadUrid item, I believe this forum post by a Telerik team member should explain the details of this. Basically it is essential for RadUpload to function properly, and disabling this string in the URL might be a bit tricky.
Back to Top