Hello,
before this is my html code and vb.bet code:
before this is my html code and vb.bet code:
<
asp:Panel
ID
=
"PanelRadlist"
runat
=
"server"
Width
=
"700px"
>
<
div
style
=
"font-family:Verdana; width:65"
id
=
"div_radlistview"
>
<
telerik:RadListView
ID
=
"RadListView1"
runat
=
"server"
DataKeyNames
=
"idutente"
ItemPlaceholderID
=
"Contenitore"
AllowPaging
=
"True"
Skin
=
"Office2010Silver"
Width
=
"650px"
OnPageIndexChanged
=
"RadListView1_PageIndexChanged"
>
<
LayoutTemplate
>
<
fieldset
style
=
"width: 700px; border:0px"
id
=
"FieldSet1"
>
<
legend
></
legend
>
<
asp:Panel
ID
=
"Contenitore"
runat
=
"server"
>
</
asp:Panel
>
</
fieldset
>
</
LayoutTemplate
>
<
ItemTemplate
>
<
div
class
=
"item"
>
<
div
class
=
"image"
>
<
asp:Image
ID
=
"Image1"
runat
=
"server"
ImageUrl='<%# CType(Container.DataItem, PropertyUtente).imageprofile%>' Height="120px" Width="110px"/>
</
div
>
<
div
class
=
"content"
>
<
div
class
=
"user"
>
<
b
><%# CType(Container.DataItem, PropertyUtente).utente%></
b
>
</
div
>
<
div
class
=
"description_category"
>
Categoria: <%# CType(Container.DataItem, PropertyUtente).Desccategoria%>
</
div
>
<
div
class
=
"description_city"
>
Città : <%# CType(Container.DataItem, PropertyUtente).Desccomune%></
div
>
<
div
class
=
"description_phone"
>
Telefono: <%# CType(Container.DataItem, PropertyUtente).Telefono%></
div
>
<
div
class
=
"description_email"
>
Email: <%# CType(Container.DataItem, PropertyUtente).Email%>
</
div
>
<
div
class
=
"item_button"
>
<
telerik:RadButton
ID
=
"RadButton1"
runat
=
"server"
Text
=
"Visualizza biglietto completo"
Width
=
"170px"
Skin
=
"Office2010Silver"
OnClick
=
"RadButton1_Click"
>
</
telerik:RadButton
>
</
div
>
</
div
>
</
div
>
</
ItemTemplate
>
</
telerik:RadListView
>
<
telerik:RadDataPager
ID
=
"RadDataPager1"
runat
=
"server"
PagedControlID
=
"RadListView1"
Culture
=
"it-IT"
Width
=
"700px"
>
<
Fields
>
<
telerik:RadDataPagerButtonField
FieldType
=
"FirstPrev"
></
telerik:RadDataPagerButtonField
>
<
telerik:RadDataPagerButtonField
FieldType
=
"Numeric"
></
telerik:RadDataPagerButtonField
>
<
telerik:RadDataPagerButtonField
FieldType
=
"NextLast"
></
telerik:RadDataPagerButtonField
>
</
Fields
>
</
telerik:RadDataPager
>
</
div
>
<!-- end div radlist -->
</
asp:Panel
>
Imports System
Imports System.Web
Imports System.Data
Imports System.Data.SqlClient
Imports Telerik.Web.UI
Imports System.Web.UI.HtmlControls
Imports System.IO
Imports TRYcontact
Public Class search
Inherits RadAjaxPage
Private ObjUtente As New PropertyUtente
Private Loadsearch As New GestoreUtente
Private Sub Carica_risultati(ByVal _str1 As String, ByVal _str2 As String)
Dim lista As List(Of PropertyUtente) = Loadsearch.Search(_str1, _str2)
label1.text = "Risultati trovati: " & CInt(lista.Count)
RadListView1.DataSource = lista
RadListView1.DataBind()
End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
Dim _str1, _str2 As String
_str1 = Request.QueryString("_str1")
_str2 = Request.QueryString("_str2")
Carica_risultati(_str1, _str2)
Me.ClientScript.RegisterStartupScript(Me.GetType, "", "Height_Div();", True)
End If
End Sub
Protected Sub RadButton1_Click(sender As Object, e As System.EventArgs)
Dim Button As RadButton = CType(sender, RadButton)
Dim item As RadListViewDataItem = CType(Button.Parent, RadListViewDataItem)
Dim dd As Integer = item.GetDataKeyValue("idutente")
Response.Redirect("publicard.aspx?_id=" & item.GetDataKeyValue("idutente"))
End Sub
Protected Sub RadListView1_PageIndexChanged(sender As Object, e As Telerik.Web.UI.RadListViewPageChangedEventArgs) Handles RadListView1.PageIndexChanged
RadListView1.CurrentPageIndex = e.NewPageIndex
Dim _str1, _str2 As String
_str1 = Request.QueryString("_str1")
_str2 = Request.QueryString("_str2")
Carica_risultati(_str1, _str2)
End Sub
End Class
ScriptManager.RegisterStartupScript(Page, Me.GetType, "Goon", "window.scrollTo(0,0);", True)
but is only a refresh of Pgina and the scrollbar is always positioned at the bottom so the page does not return at the beginning of the list.