Fire browse event with a dedicated button

Thread is closed for posting
3 posts, 1 answers
  1. Jeroen Speldekamp
    Jeroen Speldekamp avatar
    30 posts
    Member since:
    Mar 2005

    Posted 06 Jul 2010 Link to this post

    Hello Telerik people,

    I had a question about if its possible to fire the browse event of the radupload with a dedicated button.

    <asp:ScriptManager ID="ScriptManager" runat="server" /> 
     
    <telerik:RadUpload ID="CVUpload" runat="server" MaxFileInputsCount="1" ControlObjectsVisibility="None" /> 
     
    <script type="text/javascript">  
        var a = getRadUpload("<%= CVUpload.ClientID %>");   // this is null  
        var b = $find("<%= CVUpload.ClientID %>");   // this is null  
    </script> 

    Found a bit code on this site but here it only returns null.

    Greetings,
    Jeroen Speldekamp
  2. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 06 Jul 2010 Link to this post

    Hello,

    I am not sure about fire browse event for RadUpload. But you can access the client object of RadUpload in pageLoad event (or any event of control) by using same code.

     
    <script type="text/javascript"
        function pageLoad() { 
            var a = getRadUpload("<%= CVUpload.ClientID %>");   // this is null   
            var b = $find("<%= CVUpload.ClientID %>");   // this is null   
        } 
    </script> 

    The problem here is that when you initially try to get a reference to the RadUpload, the control is still not fully rendered on the page and that is why getting 'null'.


    -Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jeroen Speldekamp
    Jeroen Speldekamp avatar
    30 posts
    Member since:
    Mar 2005

    Posted 06 Jul 2010 Link to this post

    Hello Shinu,

    It works didnt even that about that!
    Thank you!

    Greetings,
    Jeroen Speldekamp
Back to Top