Microsoft
Software
Hardware
Network
Question : linq
I am trying to display data froma sql server DB in silverlight3
I followed this link
http://www.codeproject.com
/KB/silver
light/
Silv
erlight3_S
QL_WCF.asp
x
and I get an error with the return list as it cant return a list.
Error 1 Value of type 'System.Collections.Generi
c.List(Of sql.Web.one)' cannot be converted to 'System.Collections.Generi
c.List(Of sql.Web.Service1.StudentIn
fo)'.
''''''''''''''''''''''''''
''''''''''
'''''
'service1.svc
<ServiceContract(Namespace
:="")> _
<AspNetCompatibilityRequir
ements(Req
uirementsM
ode:=AspNe
tCompatibi
lityRequir
ementsMode
.Allowed)>
_
Public Class Service1
<OperationContract()> _
Public Function filldata() As List(Of StudentInfo)
Dim db As New sql.Web.DataClasses1DataCo
ntext
Dim results = From p In db.ones _
Select p
Return results.ToList
End Function
Public Class StudentInfo
Public id As String
Public subject As String
End Class
End Class
''''''''''''''''''''''''''
''''''''''
''''''''''
''''''''''
'''''
'''main.xaml.vb
Private Sub but2_click(ByVal sender As System.Object, ByVal e As RoutedEventArgs)
Dim webservice3 As New sql.ServiceReference1.Serv
ice1Client
AddHandler webservice3.filldataComple
ted, AddressOf webservice_filldatacomplet
ed
webservice3.filldataAsync(
)
End Sub
Public Sub webservice_filldatacomplet
ed(ByVal sender As Object, ByVal e As ServiceReference1.filldata
CompletedE
ventArgs)
dg1.ItemsSource = e.Result
End Sub
Answer : linq
advise them that they could use Experts Exchange *laughing*).
>> GEM !!
Random Solutions
Php 500 internal server error received on website but not using xampp at home
Custom Control Designer Error
Flash XML content
If home page add this script
Should I make a Drupal Theme from scratch?
Zebra LP 2844 label printer prints the first print job successfully, subsequent print jobs after skip labels and/or print partial data on labels until computer is rebooted.
breadcrumb trail in a dropdown box
asp.net: How to determine if a when a user login. is an Admin Account, * the menu is selected to show admin pages & reports.
LWAP are unable to join Cisco Wieeless Controller 4400
HTTP Error 500.19 - Internal Server Error