If you think about it, the code in your view is just editing a string. So a basic Replace as you have done is how I would do it.
However, why not do the work in your model, ie provide properties that return the trimmed string? Or better still, a method? EG:
<%: Model.ReplaceWS(benefit.Name); %>
Where:
public string ReplaceWS(string s)
{
s = s.Replace(" ", "");
return s;
}
If nothing else, this looks neater and makes the view easier to read.
You could also create an extension method for string (You could limit visibility by using a given namespace in the extension method definition)
That way you could write:
<%: benefit.Name.ReplaceWS(); %>
I think that is my preferred option, as it expresses what you are doing