Run loop after page load VB.NET
I would like the page to load, then I will display a GIF that's LOADING DATA and then I want this loop (see below) to run until the row count is not 0.
(An SQL job has been triggered in the previous page which takes about 1 - 2 minutes to run and so I want to display the new data automatically when it appears in the database.)
I can't figure out how to programmatically get this to work, I understand that because I have this in the page_load it will run before the page loads but I'm not sure how to run it after the page has loaded
Any help, advice or tips are very welcome Thank you
Sub Page_Load(ByVal Sender As Object, ByVal E As EventArgs) Do While GridView1.Rows.Count = 0 And GridView2.Rows.Count = 0 GridView1.DataBind() GridView2.DataBind() Loop End Sub
If using Ajax/JQuery, can you not use a timer control that posts back every seconds and as soon as there is data in both tables then disable the timer.