Last post Nov 21, 2018 02:57 AM by Nan Yu
Nov 20, 2018 12:30 PM|sweetyPaul|LINK
I have to transfer multiple set of data as json. One is datatable and another one is an integer.
The code is as follows:
In this Dt is datatable and recordcount is an integer.
Dim dT As New DataTable()
Dim ProductListDAL As New ProductListDAL()
Dim RecordCount As Integer
dT = ProductListDAL.SelectRecordProductList("NewReleases", "", PageIndex, RecordCount, PageSize)
'Dim ss As Integer = RecordCount
Dim ss As String = jc.ConvertFromDataTable(dT, "ProductSearch")
Dim hh As String = jc.ConvertfromString_noformat(RecordCount, "RecordCount")
The output of the code is
Down I want to display
Please help me.
Nov 21, 2018 02:57 AM|Nan Yu|LINK
Hi sweetyPaul ,
Do you want to convert the datatable to json ? You can try serialize a DataSet using Json.NET:
You can add the RecordCount column in datatable before convert .