Click here to Skip to main content
15,892,643 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
can somebody tell me how to add a rotator that checks the database base values after every second with a specific variable in asp.net.
Posted
Comments
Manfred Rudolf Bihy 8-Aug-11 7:18am    
Add more details about what it is you're actually trying to achieve.
What rotator? Image, text, ???
"... with a specific variable ..." ???
Be ever precise, clear, as detailed as nescessary, as concise as possible in your questions.

Thanks for your cooperation!
saifullahiit 8-Aug-11 7:34am    
actually its a currency trading website feeds are comming from a website and are stored in database. user select a currency on the front end and click on hte button. so after every seconds feeds that are stored in database are shown to the user. so i want to insert a rotator so that it takes the values from database after every second and show it to the user. i think now it will be clear to u.
Manfred Rudolf Bihy 8-Aug-11 7:43am    
Please edit your question to reflect your more specific requirements. Use the link "Improve question" underneath your question for this.
"i think now it will be clear to u" So why didn't you take the time do it right first time round. Nobody can make anything out the gibberish you posted at first. I can only repeat myself here:

"Be ever precise, clear, as detailed as nescessary, as concise as possible in your questions."
—MRB
[no name] 8-Aug-11 7:47am    
And what part are you having difficulty with? What have you tried so far?

The less information you give teh less likely anyone will be aboe to help you.
Herman<T>.Instance 8-Aug-11 8:18am    
did you try the Timer class fot this purpose? http://msdn.microsoft.com/en-us/library/system.web.ui.timer.aspx

1 solution

You can use a simple JavaScript timer to execute a function on a set interval:
http://www.w3schools.com/js/js_timing.asp[^]

You can use jQuery to easily load/replace content in an HTML element, using POST:
http://api.jquery.com/jQuery.post/[^]

Put the .post() call in your timer and update your page in the response. Your server will need a script that exposes a bit of HTML that you can put into your page on each request. That script will need to access your database.

If you're having trouble getting any of these pieces going, feel free to create new questions with specifics.

Cheers.
 
Share this answer
 
Comments
TheyCallMeMrJames 10-Aug-11 18:05pm    
I appreciate ratings and all, but if whomever dealt me the three star on this answer could kindly let me know what more I could have done to answer the above question, please do! Cheers.

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