Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to display a gif image when button is clicked but it does not work.


XML
<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>




please help me....
Mitesh
Posted

Please have a look on same discussion:
UpdateProgress not working under Updatepanel control.[^]
 
Share this answer
 
I have tested following code and its working fine..
here the tested code..

XML
<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>




check out following link for more understanding..
http://msdn.microsoft.com/en-us/library/bb386421.aspx[^]
 
Share this answer
 
Comments
[no name] 9-May-12 2:58am    
thankss brotherrr
PrashantShirke 9-May-12 3:18am    
welcome...plz mark as solved if got solved (& rate solution if found helpful.).

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