Using Eval("Name") in Function

I'm using .NET webforms. I have a grid view that can use Eval("Name") in the markup and it works fine. However, I need to do some computations on it so in the code behind I made a method called FormatName(String name). I can use that in the markup and it works when I pass it a string but not when I when I try to use Eval("Name".