Solved

How would I get items in a gridview to rotate or change every 5 seconds?

Posted on 2008-10-10
6
518 Views
Last Modified: 2012-05-05
I have a gridview that has bound items from a sql database and displays 1 item per page. Each item needs to rotate or change to the next item every 5 seconds. I don't want images so that is why I'm not using the ad rotator. Is this possible? If so, how would I accomplish it? Is there a better approach?

Thanks!
0
Comment
Question by:lsbgfl
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 7

Expert Comment

by:the_bachelor
ID: 22689353
Well one way of doing this may be to load the set of data in memory say in a dataset.
then every 5 second or so you bind a different row to the grid...
Not saying this is the best approach, Just throwing ideas out there
0
 

Author Comment

by:lsbgfl
ID: 22689464
Which event should include the timing? I tried it in the page_load event and the gridview_load event without success. I'm using <asp:objectdatasource> to populate the gridview and not the code behind page (vb.net).
0
 
LVL 7

Accepted Solution

by:
the_bachelor earned 500 total points
ID: 22689532
U could:
- looking into using threading to Time your event
- look in to the MS Ajax Timer Control : http://www.asp.net/AJAX/Documentation/Live/tutorials/TimerControlWithUpdatePanelsTutorial.aspx
(neat, no?)
- look into placing the gridview on a usercontrol with auto refresh and feed what data to display to the uc.
0
Get Actionable Data from Your Monitoring Solution

Your communication platform is only as good as the relevance of the information you send. Ensure your alerts get to the right people every time with actionable responses. Create escalation rules that ensure everyone follows the process and nothing is left to chance.

 

Author Comment

by:lsbgfl
ID: 22689998
It is in a user control. How would I incorporate auto refresh without using <meta http-equiv="refresh" content="5" />? Note: I'm also using a master page that I don't want to auto refresh. I'm not sure if auto refresh is the way to go, but I'd like to see if it would work. I've never used Ajax and do not have an Ajax website. The timer control is pretty cool though.
0
 

Author Comment

by:lsbgfl
ID: 22702906
How would I do it with threading?

From what I've read System.Threading.Thread and System.Timers.Timer are outside of the scope of the HTTPContext so I"m not quite sure how to incorporate gridview attributes.

Thanks.
0
 

Author Comment

by:lsbgfl
ID: 22704504
I'm going to try the Ajax timer control.
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

717 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