Solved

Update table automatically

Posted on 2010-11-23
6
501 Views
Last Modified: 2012-06-21
Hello,

Scenario:  We have multiple tables in .aspx pages  that we manually populate in code behind with data sets that are filled and retrieved from SQL 2008 database via data access layer.  

Issue:  What is the best way to dynamically update these tables without any user interaction or refreshing of the page?  

For example: say the table contains rows of games that are offered for entry.  Users enter the games until they are full, then they should disappear from the table.  So if user #1 enters the game and fills the last spot, this game should instantly disappear from the table for user #2 who is looking at the table of games.

Looking for a best practice solution which takes performance into affect as the number one priority.  Using asp.net 3.5 and sql 2008

Thanks.
0
Comment
Question by:kruegerste
6 Comments
 
LVL 7

Expert Comment

by:dxdinh
ID: 34202597
combine ajaxify plug in from jquery and set timer to call update those table every 1 second ?

jquery
http://www.jquery.com
 
ajaxify
http://max.jsrhost.com/ajaxify/
0
 
LVL 29

Expert Comment

by:Kumaraswamy R
ID: 34202664
0
 
LVL 21

Expert Comment

by:Alpesh Patel
ID: 34205103
Hi, you can use AJAX or JQuery. As per my opinion jQuery is best. However, both have some issue with Masterpage.
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 4

Author Comment

by:kruegerste
ID: 34205514
PatelAlpesh - what issue do you refer to with MasterPages?

It seems jquery/ajax is probably  the obvious choice.  But I'm not sure logistically how this would work. Looking for a more detailed solution.

 I think we prefer to use jquery, but would we be able to use jquery ajax features if we are using .net web controls like a gridview or repeater to display the data? It may also contain .net native paging and filtering.  Not sure how to update a table like this without rebinding it in the code-behind.

Going a step further, what is the best solution (high level)  to get data from a database, build a table like display (i.e. gridview) and then update it dynamically?  
0
 
LVL 7

Accepted Solution

by:
dxdinh earned 500 total points
ID: 34207247


  you can use handler ashx to retrieve your table result. There are tons of examples to do that but I guess you have to do some research

http://www.mikesdotnetting.com/Article/104/Many-ways-to-communicate-with-your-database-using-jQuery-AJAX-and-ASP.NET

http://sites.google.com/site/spyderhoodcommunity/tech-stuff/usingjqueryinaspnetappswithhttphandlersashx

 I learn my asp.net & jquery from Rick - he has tons of tutorials for you to start with
http://www.west-wind.com/weblog/posts/509108.aspx


0
 
LVL 4

Author Closing Comment

by:kruegerste
ID: 34210195
Thanks, will look into this stuff.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

815 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

13 Experts available now in Live!

Get 1:1 Help Now