Upload on User Control for Grid Edit Form

Thread is closed for posting
2 posts, 0 answers
  1. Goksun
    Goksun avatar
    32 posts
    Member since:
    Aug 2006

    Posted 06 Feb 2008 Link to this post

    Hello,

    I have a user control for my grid's edit form with an Rad Upload control on it. I can't get it to do a real postback. So, my files are not uploaded. I've tried realPostBack function on the user control (from the help file) but still unsuccessful getting it to work.

    Thanks
    Goksun
  2. Goksun
    Goksun avatar
    32 posts
    Member since:
    Aug 2006

    Posted 07 Feb 2008 Link to this post

    In case anyone's wondering, I've fixed the problem. After having another pass at the help file, this is what I've figured.

    on the page I have the grid control, I've added 

    <

    ClientEvents OnRequestStart="conditionalPostback"></ClientEvents>

    to the AjaxManager. And the  javascript 

    <script type="text/javascript">

    function

    conditionalPostback(e, sender)

    {

        var re = new RegExp("\.btnUpload$", "ig");

        if (sender.EventTarget.match(re))

        {

            sender.EnableAjax =

    false;

        }

    }

    </

    script>

    "btnUpload" is the Id of the upload button I have on the User Control.

    By the way, the help file section "Uploading Files with AJAX" has the ClientEvents OnRequestStart as Grid's Client Event. It should be AjaxManager's event.

    So, it is working perfectly now.Yayyyy!!!!

    Goksun
Back to Top