String format currency
问题 I have this line @String.Format(\"{0:C}\", @price) in my razor view. I want it to display a dollar sign in front of the price but instead it display a pound sign. How do I achieve this? 回答1: I strongly suspect the problem is simply that the current culture of the thread handling the request isn't set appropriately. You can either set it for the whole request, or specify the culture while formatting. Either way, I would suggest not use string.Format with a composite format unless you really