Ajax Loader Not Working On File Upload with Update Panel.

Posted by Shipramaurya under ASP.NET on 12/28/2012 | Points: 10 | Views : 1672 | Status : [Member] | Replies : 2
I have used the following Script for Loader for click event on a web Page

<asp:Panel ID="pnlProgress" runat="server" Style="background-color: #ffffff; display: none;
width: 200px">
<div style="padding: 8px">
<table border="0" cellpadding="2" cellspacing="0" style="width: 100%">
<tr>
<td style="width: 50%">
</td>
<td style="text-align: right">
<asp:Image ID="Image1" runat="server" ImageUrl="~/images/loader.gif" />
</td>
<td style="text-align: left; white-space: nowrap">
Please Wait
</td>
<td style="width: 50%">
</td>
</tr>
</table>
</div>
</asp:Panel>
<asp:ModalPopupExtender ID="mpeProgress" runat="server" TargetControlID="pnlProgress"
PopupControlID="pnlProgress" BackgroundCssClass="modalBackground" DropShadow="false" />
<script type="text/javascript">

Sys.Net.WebRequestManager.add_invokingRequest(onInvoke);
Sys.Net.WebRequestManager.add_completedRequest(onComplete);

function onInvoke(sender, args) {
$find('<%= mpeProgress.ClientID %>').show();
}

function onComplete(sender, args) {
$find('<%= mpeProgress.ClientID %>').hide();
}


function pageUnload() {
Sys.Net.WebRequestManager.remove_invokingRequest(onInvoke);
Sys.Net.WebRequestManager.remove_completedRequest(onComplete);
}

</script>


When I was using fileupload control inside Update panel Posted file was getting lost .. to resolve this I used

         <Triggers>
<asp:PostBackTrigger ControlID="btnSave" />
</Triggers>


But Now My Script for load is not working..


I want to use fileupload control inside update panel along with this script .. please provide sum solution..

@Shipra - S.M. Techie


Responses

Posted by: Shubham on: 12/29/2012 [Member] Starter | Points: 25

Up
0
Down
hi!!!
i dont sure about that but i will tell u something

if u use this control with update panel so it could not work proper so plzz remove update panel and try!!!!!!!

Thanks&Regards:-
Shubham Choudhary
Software Engineer
www.facebook.com/shubham.kunar

Shipramaurya, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Shipramaurya on: 12/29/2012 [Member] Starter | Points: 25

Up
0
Down
Hi Shubham, Thats absolutely fine but I dont want the page to be refreshed ... thats Y I used Update Panel
..
I have already used it without Update Panel .. I wanted a solution with Update Panel..

@Shipra - S.M. Techie

Shipramaurya, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response