Private Sub btnDisplayOrder_Click(sender As Object, e As EventArgs) Handles btnDisplayOrder.Click
Try
Dim aID As String = result.Value
Dim aCdt As Date = Date.Parse(dt.Value.ToString())
BillDetails = objOrdersData.gblstbdt(aID, aCdt)
JSONBillDetails = JsonConvert.SerializeObject(BillDetails)
Catch ex As Exception
MsgBox(ex.ToString(), MsgBoxStyle.OkCancel, "Error")
End Try
End Sub
这是我的aspx按钮点击。 BillDetails是一个数据表。在我的数据表中,我有ReferenceNo,BankResponse和StatusID。 我的问题是:BankResponse是一个json字符串。喜欢这个
{"MID":"S49532106",
"ORDERID":"06OpjcIJ",
"TXNAMOUNT":"1.00",
"CURRENCY":"INR",
"TXNID":"324016",
"BANKTXNID":"5159",
"STATUS":"TXN_SUCCESS"}
如何在html表格中显示详细信息。 我想在表格中显示Refno BankDetails和Status id。在银行详细信息列中,我想显示以下字段:" MId:001,状态:成功"
BillDetails = objOrdersData.gblstbdt(aID, aCdt)
从这一行我得到了一个包含数据的数据表。在那里我有一个字段名称为BankResponse。该字段值是json字符串。如何从数据表中获取此json字符串?
我的JSONBillDetails是这样的:
{"UID":"62a2a9e0-ebe4b285b3","ReferenceNo":"0pjcIJ",
"BankResponse":"{"MID":"004106","ORDERID":"00pjcIJ",
"TXNAMOUNT":"1.00",
"CURRENCY":"INR",
"TXNID":"34016","BANKTXNID":"659",
"STATUS":"TXN_SUCCESS","RESPCODE":"01","RESPMSG":"Txn Successful.",
"TXNDATE":"2017-01-28 12:03:55.0",
"GATEWAYNAME":"WALLET","BANKNAME":"","PAYMENTMODE":"PPI",
"CHECKSUMHASH":"mYpxxKD0bMYG7ZNUJzTP+"}",
"StatusID":1,"CreatedDate":"2017-01-28T17:22:47","MerchantUID":"1aafc521-9e9a-481b4b2","EasyOrderBillsUID":"62d24-93223f09777d",
"EOBguid":"62dbe07-9424-93223f09777d"}
这不是一个好的json字符串。 " BankResponse":" {" MID":" 0" .....}""这部分有一个额外的双引号。所以我可以把它转换成一个json对象。
我的代码中有什么问题?