bryker
February 11th, 2004, 10:21 AM
[VB.NET]
Surely this is a stupid question, but:
How do I get an Image control to properly show an animated GIF?
The code below is the relevant part of my .ASPX page. I just have an animated GIF in my project's /Images subfolder. I want that to be displayed at the moment the user submits the form (when the user causes a postback). At those times, I make its parent Panel (div) visible.
To be clear: the image DOES indeed appear, and at the appropriate times. It just doesn't move--it just sits there, showing the first frame of the animation. (It animates just fine in the VS.NET IDE at design-time, and it looks just fine when browsed solo in IE.)
What's going on? How do I make this thing do its animation thing as the page is being posted back?
Thanks! Needs to be inside .NET web control, by the way, rather than straight-up HTML.
<table id="tblMain" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<asp:Panel id="panelProgressBar" style="DISPLAY: none; Z-INDEX: 101; LEFT: 50px; POSITION: absolute; TOP: 100px" runat="server" BorderWidth="0px" BorderStyle="None">
<asp:Image id="imgProgressBar" runat="server" BorderStyle="None" BorderWidth="0px" ImageUrl="./Images/globe.gif" BackColor="Transparent"></asp:Image>
</asp:Panel>
</td>
</tr>
...
Surely this is a stupid question, but:
How do I get an Image control to properly show an animated GIF?
The code below is the relevant part of my .ASPX page. I just have an animated GIF in my project's /Images subfolder. I want that to be displayed at the moment the user submits the form (when the user causes a postback). At those times, I make its parent Panel (div) visible.
To be clear: the image DOES indeed appear, and at the appropriate times. It just doesn't move--it just sits there, showing the first frame of the animation. (It animates just fine in the VS.NET IDE at design-time, and it looks just fine when browsed solo in IE.)
What's going on? How do I make this thing do its animation thing as the page is being posted back?
Thanks! Needs to be inside .NET web control, by the way, rather than straight-up HTML.
<table id="tblMain" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<asp:Panel id="panelProgressBar" style="DISPLAY: none; Z-INDEX: 101; LEFT: 50px; POSITION: absolute; TOP: 100px" runat="server" BorderWidth="0px" BorderStyle="None">
<asp:Image id="imgProgressBar" runat="server" BorderStyle="None" BorderWidth="0px" ImageUrl="./Images/globe.gif" BackColor="Transparent"></asp:Image>
</asp:Panel>
</td>
</tr>
...