更新进度不起作用 [英] update progress not work
本文介绍了更新进度不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在单击按钮时显示gif图像,但是它不起作用.
i want to display a gif image when button is clicked but it does not work.
<asp:ScriptManager ID="s1" runat="server"></asp:ScriptManager>
<asp:UpdateProgress ID="up1" runat="server" AssociatedUpdatePanelID="u1">
<ProgressTemplate>
<img src="images/progress.gif" />
Processing....
</ProgressTemplate>
</asp:UpdateProgress>
<asp:UpdatePanel ID="u1" runat="server">
<ContentTemplate>
<asp:Panel ID="Panel1" runat="server">
<table align="left" border="1" width="100%">
<tr>
<td align="center" colspan="2">
<asp:Label ID="Label2" runat="server" Text="Your Message to Top Management" Font-Size="Large"
ForeColor="Black"></asp:Label>
</td>
</tr>
<tr>
<td align="left">
<asp:Label ID="Label1" runat="server" Text="Write Your Message"
Font-Size="Medium" ForeColor="Black"></asp:Label>
</td>
<td align="left">
<asp:TextBox ID="txt_msg" runat="server" TextMode="MultiLine" Height="200px"
Width="500px" Font-Size="Medium"></asp:TextBox>
</td>
</tr>
<tr>
<td colspan="2">
</td>
</tr>
<tr>
<td colspan="2" align="center">
<asp:Button ID="Button1" runat="server" Text="Send Your Message"
OnClientClick="return validate()" onclick="Button1_Click"
Font-Size="Large" />
</td>
</tr>
<tr>
<td align="center" colspan="2">
<asp:Label ID="Label3" runat="server" Font-Size="Large"
ForeColor="Green" Visible="false"></asp:Label>
</td>
</tr>
</table>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
请帮助我....
Mitesh
please help me....
Mitesh
推荐答案
请看一下相同的讨论:
UpdateProgress在Updatepanel控件下无法正常工作. [
Please have a look on same discussion:
UpdateProgress not working under Updatepanel control.[^]
我已经测试了以下代码及其正常工作. br/> 这是经过测试的代码..
I have tested following code and its working fine..
here the tested code..
<asp:ScriptManager ID="s1" runat="server">
</asp:ScriptManager>
<asp:UpdateProgress ID="up1" runat="server" AssociatedUpdatePanelID="u1">
<ProgressTemplate>
<img src="images/progress.gif" alt="processing.."/>
</ProgressTemplate>
</asp:UpdateProgress>
<asp:UpdatePanel ID="u1" runat="server">
<ContentTemplate>
<asp:Panel ID="Panel1" runat="server">
<table align="left" border="1" width="100%">
<tr>
<td align="center" colspan="2">
<asp:Label ID="Label2" runat="server" Text="Your Message to Top Management" Font-Size="Large"
ForeColor="Black"></asp:Label>
</td>
</tr>
<tr>
<td align="left">
<asp:Label ID="Label1" runat="server" Text="Write Your Message" Font-Size="Medium"
ForeColor="Black"></asp:Label>
</td>
<td align="left">
<asp:TextBox ID="txt_msg" runat="server" TextMode="MultiLine" Height="200px" Width="500px"
Font-Size="Medium"></asp:TextBox>
</td>
</tr>
<tr>
<td colspan="2">
</td>
</tr>
<tr>
<td colspan="2" align="center">
<asp:Button ID="Button1" runat="server" Text="Send Your Message"
OnClick="Button1_Click" Font-Size="Large" />
</td>
</tr>
<tr>
<td align="center" colspan="2">
<asp:Label ID="Label3" runat="server" Font-Size="Large" ForeColor="Green" Visible="false"></asp:Label>
</td>
</tr>
</table>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
请查看以下链接以了解更多信息..
http://msdn.microsoft.com/en-us/library/bb386421.aspx [ ^ ]
check out following link for more understanding..
http://msdn.microsoft.com/en-us/library/bb386421.aspx[^]
这篇关于更新进度不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文