Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

"Busy Animation" without an UpdatePanel

Posted on 2013-01-15
3
Medium Priority
?
438 Views
Last Modified: 2013-08-28
I have an Upload form on my page. Given ASP:FileUpload's proclivity for getting in a fight with the AJAX:UpdatePanel, I'm running the form sans the panel. The form runs great, but I'm getting users with 100+ thousand record files to upload, and at times it takes upwards of a minute to load their files into the database.

Now, if the AJAX:AsyncFileUpload worked on our server (there's some obscure issue with the server that forced me into using ASP:FileUpload instead) I'd be using an UpdatePanel, and subsequently an UpdateProgress... But I can't use either, as the form has to exist outside an UpdatePanel to allow the file to actually be detected.

So this brings me to the question:

Is there a simple and elegant way to implement "UpdateProgress" like functionality, without using AJAX:UpdatePanel/AJAX:UpdateProgress?
0
Comment
Question by:Paul Kahl
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 41

Expert Comment

by:guru_sami
ID: 38780207
Here's some very basic way you can try:

1: Add a div and make it hidden:
2: Make it visible via jquery when your upload button is clicked.
3: The div should hide itself when the postback is finished.

Note: You can make the content of that div as fancy as you like. e.g. add an progress gif

<script type="text/javascript">
        $(function () {
            $("#btnUploadprog").click(function () {
                $("#progress").show();
            });
        });
    </script>

<asp:FileUpload ID="FileUpload1" runat="server" />
    <asp:Button ID="btnUploadprog" runat="server" Text="Upload with Progress" 
        onclick="btnUploadprog_Click" />
    <div id="progress" style="display:none">
        Upload in progress...
    </div>

Open in new window

0
 
LVL 3

Author Comment

by:Paul Kahl
ID: 38807190
I gave that a whirl, but I got nothing appearing at all.

Code used:
    <%--SAP BW Actuals Uploader--%>
    <asp:Panel ID="pnlSAPBWActuals" runat="server">
        <script type="text/javascript">
            $(function () {
                $("#btnUploadSAPBWActuals").click(function () {
                    $("#pnlUploader_SAPBWActuals_Progress").show();
                });
            });
        </script>
        <div id="pnlUploader_SAPBWActuals_Progress" style="display:none">
            <img src="images/loading_animation_liferay.gif" />
        </div>

        <div style="padding: 5px;">
            <asp:FileUpload ID="fuSAPBWActuals" runat="server" UploaderStyle="Modern" Width="500" CssClass="submit" ClientIDMode="AutoID" />
            <asp:Button ID="btnUploadSAPBWActuals" runat="server" Text="Upload" OnClick="btnUploadSAPBWActuals_Click" CssClass="submit" style="margin-left: 10px;" />
        </div>
    </asp:Panel>

Open in new window

0
 
LVL 41

Accepted Solution

by:
guru_sami earned 1500 total points
ID: 38807518
Are you getting any javascript errors?
Make sure you have added reference to jquery.

e.g. <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
This article discusses how to implement server side field validation and display customized error messages to the client.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question