BlockStudio.Html.HtmlService.TransactionHtml C# (CSharp) Method

TransactionHtml() public static method

public static TransactionHtml ( Transaction tx ) : string
tx Transaction
return string
        public static string TransactionHtml(Transaction tx)
        {
            var html = Header();

            html += string.Format("<div>Hash : {0}</div>", tx.Hash);
            html += string.Format("<div>Nonce : {0}</div>", tx.Nonce);
            html += string.Format("<div>From : {0}</div>", tx.From);
            html += string.Format("<div>To : {0}</div>", tx.To);

            html += Footer();

            return html;
        }

Usage Example

Example #1
0
        public void LoadTransaction(string txHash)
        {
            var tx = EthereumService.GetTransactionByHash(txHash);

            WebBrowser.DocumentText = HtmlService.TransactionHtml(tx);
        }