INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

UpdateProgress not working

UpdateProgress not working

(OP)
I have an application that uploads an excel spreadsheet to a gridview. The gridview is then loaded into a table in a database. That works fine, but the updateprogress control will not display. Any help would be greatly appreciated. Here is the asp.net code:

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<div class="content">
Select file:
<asp:UpdatePanel runat="server" ID="pnlUpload">
<Triggers>
<asp:PostBackTrigger ControlID="btnRunImport" />
</Triggers>
<ContentTemplate>
<fieldset>
<asp:FileUpload ID="fuGroupAwarenessXLS" runat="server" />
<asp:Button ID="btnRunImport" runat="server" Text="Upload" OnClick="btnRunImport_Click" />
<br />
</fieldset>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress runat="server" ID="uplGroupAwareness" AssociatedUpdatePanelID="pnlUpload" >
<ProgressTemplate>
<asp:Image ID="Image1" runat="server" ImageUrl="~/ADMIN/new/PRIVATE/GAINSHARE/group_growth/ajax-loader.gif" />
</ProgressTemplate>
</asp:UpdateProgress>

</div>
</form>

</asp:Content>

VB.net code


Protected Sub btnRunImport_Click(sender As Object, e As EventArgs) Handles btnRunImport.Click
ImportToGrid()
End Sub

RE: UpdateProgress not working


The default delay to display the update progress panel is .5 seconds. If the time it takes to bind the grid is less that the progress panel will not appear. You can set the DisplayAfter property in the UpdateProgress markup to 0 to show it right away.


CODE

<asp:UpdateProgress runat="server" ID="uplGroupAwareness"
 AssociatedUpdatePanelID="pnlUpload" DisplayAfter="0" > 


Mark

"You guys pair up in groups of three, then line up in a circle."
- Bill Peterson, a Florida State football coach

RE: UpdateProgress not working

(OP)
Even after adding the Display after = 0 the image still will not show. I still get the waiting.. notification and the data loads into the table but the image still will not show. Am I supposed to add some javascript or something? This is really baffling me.

RE: UpdateProgress not working

(OP)
Got it! I was missing the Javascript code.

<script language="javascript" type="text/javascript">
function displaywaitmsg() {
var updateProgress = $get("<%= uplGroupAwareness.ClientID%>");
updateProgress.style.display = "inline-block";
document.getElementById('imgLoading').style.display = "none";
document.getElementById('pnlUpload').innerHTML =
'<asp:Image ID="imgLoading" runat="server" ImageUrl="~/nnnnnnnn/ajax-loader.gif" /><br/><strong>Uploading....</strong>';
}
</script>

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close