You can use asp:Timer control and in OnTick event you can call a method that re-populates the GridView or Repeater control. Read more about timer at
http://www.dotnetfunda.com/tutorials/ajax/timer.aspx.
Preferable approach
However, above is not preferable ways now, you can instead use javascript timer and call jquery get method to populate the data.
<script>
var count = 0;
function TestFunction() {
count++;
$.get(
"PopulateDataAgain.aspx",
{ ag: "2", bg: "6" },
function (data) {
$("#divResult").html(data);
});
t = setTimeout("TestFunction()", 10000);
}
</script>
Look at above code snippet, where we are calling PopulateDataAgain.aspx page after every 10000 milliseconds (10 seconds). This page will have the GridView or Repeater control and in page load, populate the data to the GridView or Repeater.
This should work.
In case you are looking to learn jQuery.get method read this
http://techfunda.com/Howto/jquery/397/post-get-get-post-request-to-server and to understand JavaScript timer, read this
http://techfunda.com/Howto/javascript/594/timer.
Regards,
Sheo Narayan
http://www.dotnetfunda.com
Agasimani, if this helps please login to Mark As Answer. | Alert Moderator