Click here to Skip to main content
15,893,487 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
In my web page I tried with the following code. It is not working. Can somebody guide? Further I want to place that update progress at required place in the screen using 'style'.
Thank you.

XML
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="updateprogress_test.aspx.cs" Inherits="updateprogress_test" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress ID="UpdateProgress1"
     AssociatedUpdatePanelID="UpdatePanel1" runat="server">
<ProgressTemplate>
Update in Progress……..
</ProgressTemplate>
</asp:UpdateProgress>
<asp:Button ID="Button1" runat="server"
     OnClick="Button1_Click" Text="Button" />
    </form>
    <Triggers>
    <asp:AsyncPostBackTrigger ControlID="Button1" EventName="Event"/>
</Triggers>
</body>
</html>


It reflects no err or exception but is blank without updateprogress result.
Posted
Updated 26-Aug-13 3:38am
v3
Comments
jkirkerx 26-Aug-13 17:38pm    
maybe the progress works, but you don't see it

try putting a sleep command in your button click code
threading.sleep(2500)

and wrap your progress text in a span tag with style color so you can see it.
<span style="color:white;">Progress</span>

1 solution

Place the Triggerssection inside UpdatePanel. Cut </form> & place it before </body>

Try again. If still problem comes then check these
UpdateProgress is not working with AssociatedUpdatePanelID [^]
Programming UpdateProgress Controls in Client Script[^]
Update progress not working[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900