hi guys,
ì wrote this web service code:
and this is radlistview html code:
this code is possible send it to source radlistview?
ì wrote this web service code:
Imports System.Web.ServicesImports System.CollectionsImports System.Collections.GenericImports System.Web.Script.ServicesImports SystemImports System.DataImports System.WebImports System.Data.SqlClientImports Telerik.Web.UI<WebService([Namespace]:="http://tempuri.org/")> _<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _<ScriptService()> _Public Class TryWebService <WebMethod()> _ Public Function Search(ByVal _Str1 As String, ByVal _Str2 As String) As List(Of PropertyUtente) Using scope As New TransactionScope() Dim lista As New List(Of PropertyUtente) Dim conString = ConfigurationManager.ConnectionStrings("TrycontactString") Dim strConnString As String = conString.ConnectionString Using db As New SqlConnection(strConnString) db.Open() 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 Dim _image As String If sqldr.GetSqlString(6).IsNull = True Then _image = "/image/avatarborder.png" Else _image = sqldr.GetSqlString(6).Value End If Dim recapiti As String = "" If (sqldr.GetSqlValue(4).IsNull = True Or sqldr.GetSqlValue(4).ToString = String.Empty) And (sqldr.GetSqlValue(5).IsNull = True Or sqldr.GetSqlValue(5).ToString = String.Empty) Then recapiti = "Non disponile" ElseIf sqldr.GetSqlValue(4).IsNull = False And (sqldr.GetSqlValue(5).IsNull = True Or sqldr.GetSqlValue(5).ToString = String.Empty) Then recapiti = sqldr.GetSqlValue(4).Value ElseIf (sqldr.GetSqlValue(4).IsNull = True Or sqldr.GetSqlValue(4).ToString = String.Empty) And (sqldr.GetSqlValue(5).IsNull = False) Then recapiti = sqldr.GetSqlValue(5).Value ElseIf sqldr.GetSqlValue(4).IsNull = False And sqldr.GetSqlValue(5).IsNull = False Then recapiti = sqldr.GetSqlValue(4).Value & " - " & sqldr.GetSqlValue(5).Value End If 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 = recapiti, _ .Imageprofile = _image, _ .Email = sqldr.GetSqlString(7).Value}) End While End Using End Using End Using Return lista scope.Complete() End Using End FunctionEnd Classand this is radlistview html code:
<telerik:RadListView ID="RadListView1" runat="server" DataKeyNames="idutente" ItemPlaceholderID="Contenitore" AllowPaging="True" Width="650px"> <LayoutTemplate> <fieldset style="width: 700px; border:0px" id="FieldSet1"> <legend></legend> <asp:Panel ID="Contenitore" runat="server"> </asp:Panel> <telerik:RadDataPager ID="RadDataPager1" runat="server" PagedControlID="RadListView1" Width="700px" Culture="it-IT" BackColor ="#ecede5"> <Fields> <telerik:RadDataPagerButtonField FieldType="FirstPrev"></telerik:RadDataPagerButtonField> <telerik:RadDataPagerButtonField FieldType="Numeric"></telerik:RadDataPagerButtonField> <telerik:RadDataPagerButtonField FieldType="NextLast"></telerik:RadDataPagerButtonField> </Fields> </telerik:RadDataPager> </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"> <div style="width:16px; height:16px; float:left; padding-right:3px"> <img src="/image/icone/user1.png" alt="NP" /> </div> <b><%# CType(Container.DataItem, PropertyUtente).utente%></b> </div> <div class="description_category"> <div style="width:16px; height:16px; float:left; padding-right:3px"> <img src="/image/icone/categoria.png" alt="NP" /> </div> Categoria: <%# CType(Container.DataItem, PropertyUtente).Desccategoria%> </div> <div class="description_city"> <div style="width:16px; height:16px; float:left; padding-right:3px"> <img src="/image/icone/home.png" alt="NP" /> </div> Città: <%# CType(Container.DataItem, PropertyUtente).Desccomune%></div> <div class="description_email"> <div style="width:16px; height:16px; float:left; padding-right:3px"> <img src="/image/icone/email.png" alt="NP" /> </div> Email: <%# CType(Container.DataItem, PropertyUtente).Email%> </div> <div class="description_phone"> <div style="width:16px; height:16px; float:left; padding-right:3px"> <img src="/image/icone/telefono.png" alt="NP" /> </div>Telefono: <%# CType(Container.DataItem, PropertyUtente).Telefono%></div> <div class="item_button"> <telerik:RadButton ID="RadButton1" runat="server" Text="Biglietto completo" Width="140px" Skin="Office2010Silver" OnClick="RadButton1_Click"> </telerik:RadButton> </div> </div> </div> </ItemTemplate> </telerik:RadListView>this code is possible send it to source radlistview?