Question: Given an object literal such :

```
var data = {
   { "A": 3, "B": 4, "C²": 25, "C": 5 } // hint: triangle
}

```

where there is a mathematical relation between values (C² = A² + B²).

Is there possible to have some 'inside operation' such:

```
var data = {
   { "A": 3, "B": 4, "C²": (Math.pow(A,2)+Math.pow(B,2)), "C": Math.sqrt("C²") } // hint: triangle
}

```

I will have a set of +200 A, B values, from which I wish to calculate the C value, to then reuse it. 

If possible, **how to do so ?**

---

Edit: I use this as a local data, not as an exchange format crossing the web.

Answer: 
Like others said, you can't use server-side code in CSS. What you did is almost correct, if you make sure the string is accessible from the code behind:

```
protected string strCountryCookie = "GB";

```

and then fix your statement 

```
<head runat="server">
    <title>Test</title>
    <% if (strCountryCookie == "GB")
       { %>
       <style type="text/css">
        #acloginpod {
                width:380px;
                background:#ebebeb url(../images/acloginpodbg.gif) repeat-x;
                border:1px solid #d3d3d3;
                -webkit-border-radius:7px;
                -moz-border-radius:7px;
            }
       </style>
    <%} %>

```

Although this will get rather ugly quick... especially if you add a bunch of countries. 

Another option is to put all the custom styles into its own style sheet and then dynamically load up the style sheet based on the cookie. You get the benefit of the style sheet being cached in this case:

```
<link id="_countryStyleSheet" rel="stylesheet" type="text/css" runat="server" />

```

And then load the style sheet in your code behind:

```
_countryStyleSheet.Href = String.Format("~/styles/{0}.css", strCountryCookie);

```

In this example, the style sheet would be named `GB.css`, etc.
You can't use any code in CSS files.

you can put your css into a separate file and then include it or not in the header based on your condition. 

approach that I prefer in such cases is to include ALL css markup on each page, but rather assign my elements with different classes based on condition. For you that would mean to use a class .acloginpod instead of id and then assign element with this class only when country is 'DE'.

or if you want different styles for different countries then define element class as following:
 ">

and in your css define different classes like mydiv-DE or mydiv-GB