Reputation: 17
I have a primary key AccountNumber which is INT. I want it to be displayed in my View like this: 123-456-78. How can I add '-' character between the numbers?
Thanks!
Upvotes: 1
Views: 162
Reputation: 43959
you can put in your view this code
<div> @Model.AccountNumber.ToString("000-000-00") </div>
Upvotes: 1