Solved

Gif Image does not animate in aspx page

Posted on 2008-06-16
5
735 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

910 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now