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

Upload on User Control for Grid Edit Form

1 Answer 115 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Goksun
Top achievements
Rank 1
Goksun asked on 07 Feb 2008, 01:09 AM
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

1 Answer, 1 is accepted

Sort by
0
Goksun
Top achievements
Rank 1
answered on 07 Feb 2008, 07:19 PM
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
Tags
Upload (Obsolete)
Asked by
Goksun
Top achievements
Rank 1
Answers by
Goksun
Top achievements
Rank 1
Share this question
or