1

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!

1

1 Answer 1

1

you can put in your view this code

<div> @Model.AccountNumber.ToString("000-000-00")  </div>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.