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
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
lblResultCount.Text = "Found " & suppliers.Count & " Suppliers matching the search criteria."
pnlSupplierDisplay.Visible = True
lblResultCount.Text = "No Suppliers matching the search criteria."
pnlWaiting.Visible = False 'and then where it is hidden again.
Catch ex As Exception