This is a migrated thread and some comments may be shown as answers.

Ajaxloadingpanel stoped when load page with radlistview

1 Answer 27 Views
This is a migrated thread and some comments may be shown as answers.
Fabio Cirillo
Top achievements
Rank 1
Fabio Cirillo asked on 04 Dec 2012, 12:16 PM

I've two page aspx: first page is search.aspx, second page is reasult.aspx

into page search.aspx i write this code:



"reasult.aspx?_str1=" & Txtsearch1.Text & "&_str2=" & Txtsearch2.Text)

and then pass the values to the second page result.aspx....Into first page there's a ajaxloadingpanel that appears when I send the data, but the loading is still.

Perhaps because the page has result.aspx in load_page loading data from the database? And so it stops loading.

this code in second page:


Imports System
Imports System.Data
Imports System.Web
Imports System.Data.SqlClient
Imports Telerik.Web.UI
Imports System.IO
  Private Loadsearch As New GestoreUtente     
  Dim list As List(Of PropertyUtente) = Loadsearch.Search(_str1, _str2)
        RadListView1.DataSource = list
Public Class GestoreUtente
    Public Function Search(ByVal _Str1 As String, ByVal _Str2 As String) As List(Of PropertyUtente)
        Dim lista As New List(Of PropertyUtente)
            Dim conString = ConfigurationManager.ConnectionStrings("TrycontactString")
            Dim strConnString As String = conString.ConnectionString
            Using db As New SqlConnection(strConnString)
                Using sqlcmd As New SqlCommand("Sp_searching_like", db)
                    sqlcmd.CommandType = CommandType.StoredProcedure
                    sqlcmd.Parameters.AddWithValue("@Search", SqlDbType.VarChar).Value = _Str1
                    sqlcmd.Parameters.AddWithValue("@Searchluogo", SqlDbType.VarChar).Value = _Str2
                    Using sqldr As SqlDataReader = sqlcmd.ExecuteReader
                        While sqldr.Read
                            lista.Add(New PropertyUtente With {.idutente = sqldr.GetSqlInt32(0).Value, _
                                                                .utente = sqldr.GetSqlString(1).Value, _
                                                                .Desccategoria = sqldr.GetSqlString(2).Value, _
                                                                .Desccomune = sqldr.GetSqlString(3).Value, _
                                                                .Telefono = sqldr.GetSqlString(4).Value, _
                                                                .Cellulare = sqldr.GetSqlString(5).Value, _
                                                                .Imageprofile = sqldr.GetSqlString(6).Value, _
                                                                .Email = sqldr.GetSqlString(7).Value})
                        End While
                    End Using
                End Using
            End Using
        Catch ex As SqlException
            Exit Try
        Catch ex As Exception
            Exit Try
        End Try
        Return lista
    End Function
End Class

1 Answer, 1 is accepted

Sort by
Maria Ilieva
Telerik team
answered on 07 Dec 2012, 11:25 AM
Hello Fabio,

Note that when performing redirect to another page there is no request to the server and respectively there is no ajax ResponseEnd event to fire. Therefore the RadAjaxLoadingPanel could not indicates end of the request to hide on. You could handle an appropriate client event which fires before redirecting the page and manually hide the loading panel as shown here:

Kind regards,
Maria Ilieva
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Asked by
Fabio Cirillo
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question