Solved

Update table automatically

Posted on 2010-11-23
6
497 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
Comment Utility
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
Comment Utility
0
 
LVL 21

Expert Comment

by:Alpesh Patel
Comment Utility
Hi, you can use AJAX or JQuery. As per my opinion jQuery is best. However, both have some issue with Masterpage.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 4

Author Comment

by:kruegerste
Comment Utility
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
Comment Utility


  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
Comment Utility
Thanks, will look into this stuff.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

763 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

6 Experts available now in Live!

Get 1:1 Help Now