scm0sml
asked on
spinning wheel with update panel
Hi,
I have a search that I am doing that can take a few seconds to come back.
However it isn't blatently obvious that anything is happening so I want to use the spinning ajax wheel.
I have my code inside an <asp:updatepanel and want to display the wheel while the search is happening.
I have the code below but the wheels doesn't show which is fair enough.
How is this normally done?
I have a search that I am doing that can take a few seconds to come back.
However it isn't blatently obvious that anything is happening so I want to use the spinning ajax wheel.
I have my code inside an <asp:updatepanel and want to display the wheel while the search is happening.
I have the code below but the wheels doesn't show which is fair enough.
How is this normally done?
Protected Sub btnSearch_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSearch.Click
Dim suppliers As List(Of Supplier) = Nothing
Try
If txtSearchTerm.Text <> "" Then
pnlWaiting.Visible = True 'this is where the wheel should become visible
suppliers = New List(Of Supplier)
suppliers = HelperGeneral.GetSuppliers(txtSearchTerm.Text)
If suppliers.Count > 0 Then
rptSuppliers.DataSource = suppliers
rptSuppliers.DataBind()
lblResultCount.Text = "Found " & suppliers.Count & " Suppliers matching the search criteria."
pnlSupplierDisplay.Visible = True
Else
lblResultCount.Text = "No Suppliers matching the search criteria."
End If
pnlWaiting.Visible = False 'and then where it is hidden again.
End If
Catch ex As Exception
Throw
End Try
End Sub
ASKER
OK I'd appreciate an example!! Thanks in advance.
Ok :
This might help faster :
I've taken my needed code from
http://www.codeproject.com/script/Articles/ArticleVersion.aspx?aid=35061&av=6251
This might help faster :
I've taken my needed code from
http://www.codeproject.com/script/Articles/ArticleVersion.aspx?aid=35061&av=6251
And this was the other Source of my Code :
http://www.codeproject.com/KB/aspnet/PleaseWaitButton_ASPNET.aspx
http://www.codeproject.com/KB/aspnet/PleaseWaitButton_ASPNET.aspx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I wrote it myself in the end as it is only needed in the one place but thank you for the idea!!
Thing is here that you should ensure the wheel is visible and giving a function to call when shown
Then when the wheel is shown it must call the given function.
I'll look in my archive for a code-example