This is my custom code:
Public Class GetMemberDetails
Public Block As String
End Class
Public Class MemberDetails
Public getResult As GetMemberDetails
End Class
Function GetMemberDetailsFromWebService(ByVal nricField As String) As String
Dim returnJson As String
Dim jsonUrl = String.Format("http://URLxxxxxxxxxx?",nricField )
Using webClient
Dim json = webClient.DownloadString(jsonUrl)
Dim result = javaScriptSerializer.Deserialize(Of MemberDetails)(json)
Dim resultAddress = String.Format("Block No.: {0}", result.getResult.Block)
If json = "" Then
returnJson = ""
Else
returnJson = resultAddress
End If
End Using
End Function
---
Where javaScriptSerializer & webClient are the Instance Name that I had set up in the "References"
Class Name: System.Net.WebClient Instance Name: webClient
Class Name: System.Web.Script.Serialization.JavaScriptSerializer Instance Name: javaScriptSerializer
The VB function was utilised in the expression in the Table cell:
=Code.GetMemberDetailsFromWebService(Fields!governmentid.Value)
And I got the error as shown in th screenshot.