Solved

Gif Image does not animate in aspx page

Posted on 2008-06-16
5
739 Views
Last Modified: 2010-01-28
Hi,

 I have a gif image in a ASP.net C# page that does not animate when page is loaded in IE. How can I solve this issue?

Thanks in advance



<asp:Image id="Image1" runat="server" ImageUrl="loading16.gif"></asp:Image>

Open in new window

0
Comment
Question by:negreteo
  • 3
5 Comments
 
LVL 6

Expert Comment

by:rafayali
ID: 21798751
It does not animate, or it does not SHOW at all? Meaning, is the X sign show, instead of an image?

I ask this, because when you use <asp:image> server control, the ImageUrl property requires that the images be loaded as part of your project (in vs 2008).

That is, create an images folder (the name can be anything) and store the file in that folder. Once that is done use this syntax

<asp:image id="Image1" runat="server" ImageUrl="~/image_folder_name/loading16.gif" />

0
 

Author Comment

by:negreteo
ID: 21798761
I am developing in VS 2003, the image is shown but it does not animate
0
 
LVL 15

Expert Comment

by:Solar_Flare
ID: 21799185
if the image shows but is not animated then either the file is not animated or the browser cannot display it properly.

how did you create the animated gif, and have you seen it animating outside of the aspx page?
0
 

Author Comment

by:negreteo
ID: 21804456
If I open the image using IE it animates but when I run my solution from VS and the page is displayed the image does not animate
0
 

Accepted Solution

by:
negreteo earned 0 total points
ID: 21827979
I was able to do it with Javascript

var ctr = 1;
            
function UpdateImg(ctrl,imgsrc)
 {
   var img = document.getElementById(ctrl);
   img.src = imgsrc;
}

setTimeout("UpdateImg('imgLoading','../images/Loading16.gif');",50);
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question