473,466 Members | 1,565 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Answer to 2 questions

I am posting this to answer two question that I had posted earlier. I do
this since I think it is good practice for those who ask to confirm if
others suggestions fix their problem or if the poster fixed the problem
thereselves.

First is a problem with creating a "progress" type animation during the
playing of media files.

To accomplish this I did the following:

Create the element (I used a <td>) as follows:

<td id="DurationTDPos" style=" text-align:center;
background-image: url(Images/Progress.png);
background-position-x: -325px;
background-repeat: repeat-y ">

The png file is 325px wide to match the length of the td. It is originally
positioned -325px to make it non-visible using the background-position-x
attribute. As the media plays you calculate the % of the media played and
move the background image accordingly.

if (WMP.controls.currentPosition 0)
{
currentPercent = (WMP.controls.currentPosition /
curItem.duration) * 100;
one = 325 - Math.floor(325 * (currentPercent/100));
two = '-' + one;
three = two + 'px';
currentPXString = three;
DurationTR.style.backgroundPositionX =currentPXString ;
}

The second problem was that when I was using a repeater I used the
ItemCreated rather than the ItemDataBound. What happened was the first time
it executed all looked fine on the page. A subsequent execution caused the
page to skip the page_load event and the button_click event such that the
data was not bound on the second execution and the ItemCreated was called
first with no e.Item.DataItem.

Changing the event fixed this problem.

Thanks
Lloyd Sheen

Mar 7 '08 #1
0 788

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Troy | last post by:
I would really appreciate it if someone could give me the answers or direct me to a place that would have the answers to the following 5 questions. 1. I need an example of SQL select statement....
9
by: Dave H | last post by:
Hello, I have a query regarding definition lists. Is it good practice semantically to use the dt and dd elements to mark up questions and answers in a frequently asked questions list, or FAQ? ...
4
by: Victor Bazarov | last post by:
Just a quick friendly reminder. I'd like to quote from section 5 of the FAQ Lite, question 5.5: "Please don't answer a question that's already in the FAQ." Yes, I am guilty of not always...
33
by: Nigel Molesworth | last post by:
I've Googled, but can't find what I need, perhaps I asking the wrong question! I want a "FAQ" page on a web site, I hate those pages that scroll you to the answer so and I figured that a good...
1
by: Alireza Kheyrollahi | last post by:
This is the third time I am posting this message. Please help if you can. ------------------------------------------- Hi all, I have got three questions. For the first two, I need just...
5
by: Prakash | last post by:
Hi Friends, While i am searching the c# interview questions in the internet, i got the following questions for Architect level. Please give me the answer for the following questions. (i hope i...
32
by: Michael C | last post by:
I want to inherit from Bitmap to add a property but I can't because it's sealed. Is there any reason to seal a class? Thanks, Michael
4
by: Graham Feeley | last post by:
I asked about security and nobody wants to help here. Am I in the wrong area or is it a sticky subject I will ask again for your help I have got myself into a bind here.( Newbie) I have somehow...
2
by: nivedita | last post by:
Hi All, I want to dot net interview question with answer if any one have question with answer please send me.. i am fresher Thanks in advance.. Nivedita
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.