Hi,
According to my test,The following code works:
<%@. Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected void Button1_Command(object sender, CommandEventArgs e)
{
System.Threading.Thread.Sleep(3000);
Label1.Text = "The time is: " + DateTime.Now.ToString();
}
</script><html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>UpdatePanelTutorialIntro1</title>
<style type="text/css">
#UpdatePanel1 {
width:300px; height:100px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div style="padding-top: 10px">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<fieldset>
<legend>UpdatePanel</legend>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label><br />
<asp:Button ID="Button1" runat="server" OnCommand="Button1_Command" CommandArgument="Hello!"
Text="Button" />
</fieldset>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress ID="UpdateProgress1" runat="server">
<ProgressTemplate>
Processing...
<img src="http://pics.10026.com/?src=1061_8335.gif" mce_src="1061_8335.gif" />
</ProgressTemplate>
</asp:UpdateProgress>
<br />
</div>
</form><script type="text/javascript" language="javascript">
Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(BeginRequestHandler);
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
function BeginRequestHandler(sender, args)
{
document.getElementById("Button1").disabled = true;
}
function EndRequestHandler(sender, args)
{
document.getElementById("Button1").disabled = false;
}
</script></body>
</html>
Hope this helps.
It is not about your code,I guess the Gifs at other site are not animated in your IE too.
If you have further questions on this, you must do some changes on the IE setting.
if I put a simple button with:
protected void Button1_Click(object sender, EventArgs e) { System.Threading.Thread.Sleep(3000); }It works!
But with my sorting, I have problem:
My image begins to liven up, then bug and does not liven up any more.
As if the treatment was too heavy.
Sound strange,I am afraid we cannot find out the exact root cause without further information captured when the problem occurs.
I think that I really need the source code to reproduce the problem, so that I can investigate the issue. It is not necessary that you send out the complete source of your project. I just need a simplest sample to reproduce the problem. You can remove any confidential information or business logic from it.
Thank you.
1<%@. Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>23<%@. Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>4<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">5<html xmlns="http://www.w3.org/1999/xhtml">6<head runat="server">7 <title>Untitled Page</title>8</head>9<body>10 <form id="form1" runat="server">11 <asp:ScriptManager ID="ScriptManager1" runat="server" />12 <div>1314 <asp:UpdateProgress ID="UpdateProgress1" runat="server">15 <ProgressTemplate>16 <img src="gears_an.gif" alt="a" />17 update in18 progress...19 </ProgressTemplate>20 </asp:UpdateProgress>21 <br />22 <table>23 <tr>24 <td rowspan="3">25 26 </td>27 <td colspan="2" rowspan="3">28 29 <asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="true" UpdateMode="Always">30 <ContentTemplate>31 <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:maConnectionString%>"32 SelectCommand="SELECT [CID], [CNom], [CPrenom] FROM [t_RCTMT_Candidat]"></asp:SqlDataSource>33 34 <asp:GridView ID="GridView2" runat="server" AllowSorting="True" DataSourceID="SqlDataSource2">35 </asp:GridView>36 </ContentTemplate>37 </asp:UpdatePanel>38 <cc1:UpdatePanelAnimationExtender TargetControlID="UpdatePanel1" ID="UpdatePanelAnimationExtender1"39 runat="server">40 <Animations>41 <OnUpdating>42 <Color PropertyKey="color"43 StartValue="#FF0000" EndValue="#FFFFFF" />44 </OnUpdating>45 <OnUpdated>46 <Color PropertyKey="color"47 StartValue="#FFFFFF" EndValue="#000000" />48 </OnUpdated></Animations>49 </cc1:UpdatePanelAnimationExtender>50 </td>51 <td style="width: 16px">52 </td>53 <td style="width: 29px">54 </td>55 </tr>56 </table>57 </div>58 </form>59</body>60</html>
No comments:
Post a Comment