• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 523
  • Last Modified:

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

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
lsbgfl
Asked:
lsbgfl
  • 4
  • 2
1 Solution
 
the_bachelorCommented:
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
 
lsbgflAuthor Commented:
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
 
the_bachelorCommented:
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
Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

 
lsbgflAuthor Commented:
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
 
lsbgflAuthor Commented:
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
 
lsbgflAuthor Commented:
I'm going to try the Ajax timer control.
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now