Check Eval() with function
<p>I'm trying to make a function that checks if the price has a discount, and if it does it should output a calculated value, but i can't seem to get it working. Anyone knows what i am doing wrong?</p>

<p>ASP.NET: (Extraction from DB is working as intended)</p>

<pre><code>&lt;%# DiscountFunction(Eval("status"), Eval("price"), Eval("procent"))%&gt;
</code></pre>

<p>Code behind:</p>

<pre><code>public string DiscountFunction(string status, string price, string discount)
    {
        if(status == "True") {
            int price2 = Convert.ToInt32(price);
            int discount2 = Convert.ToInt32(discount);
            int calc = (price2 / 100) * discount2;
            int final_calc = pris2-calc;
            return price + " " + final_calc;
        } else {
            return price.ToString();
        }
    }
</code></pre>

<p>I'm getting the error that my function contains invalid arguments.</p>
