Question: i have this code in my updatetobill code. im planning to round it off to nearest tenth i think? for example the price is 123456.123456, what i want to do is to have it as 123456.12 because since its a price, i need the cents. thanks in advance for any help :)

```
private void UpdateTotalBill()
    {
        double vat = 0;
        double TotalPrice = 0;
        long TotalProducts = 0;
        foreach (DataListItem item in dlCartProducts.Items)
        {
            Label PriceLabel = item.FindControl("lblPrice") as Label; // get price 
            TextBox ProductQuantity = item.FindControl("txtProductQuantity") as TextBox; // get quantity
            double ProductPrice = Convert.ToInt64(PriceLabel.Text) * Convert.ToInt64(ProductQuantity.Text); //computation fro product price. price * quantity
            vat = (TotalPrice + ProductPrice) * 0.12; // computation for total price. total price + product price
            TotalPrice = TotalPrice + ProductPrice+40 +vat;
            TotalProducts = TotalProducts + Convert.ToInt32(ProductQuantity.Text);

        }
        Label1.Text = Convert.ToString(vat);
        txtTotalPrice.Text = Convert.ToString(TotalPrice); // put both total price and product values and converting them to string
        txtTotalProducts.Text = Convert.ToString(TotalProducts);
    }

```

Answer: 
```
@JabranSaeed if you want to use foroeignObject,beter to follow this method 

<html lang="en">
    <head>
        <meta charset="utf-8" />
        <title></title>
    </head>
    <body>
    <svg id="t">
    <g>

    </g>
    </svg>
<script>
  var s = document.getElementById('t');
        var g = s.childNodes[1];

        var foreign = document.createElementNS

('http://www.w3.org/2000/svg',"foreignObject");

        foreign.setAttribute('width', 500);
        foreign.setAttribute('height',500);
        var iDivele = document.createElement('div');
        var ob = document.createTextNode("xxxx");
        iDiv.appendChild(ov);
        foreign.appendChild(iDivele);

        g.appendChild(foreign);
</script>
</body>
</html>

```
Actually your appending child part is creating the probelm.

you didn't appended it in proper order.

Check the code below and give a try

```
        var s = document.getElementById('t');
        var g = s.childNodes[1];
        g.childNodes[1].remove();
        var foreign = document.createElementNS('http://www.w3.org/2000/svg',"foreignObject");
        foreign.setAttribute('width', 500);
        foreign.setAttribute('height', 150);
        var t = document.createTextNode("This is a paragraph.");
        foreign.appendChild(t);
        g.appendChild(foreign);

```

let me know if it is working