如何在Visual Studio 2010中将文本框设置为掩码文本框?
问题描述:
我有一个包含十个文本框的表单。我正在使用VS 2010 ASP.NET和C#。我想要做的是让文本框在用户键入数字时显示逗号。我不希望将带逗号的数字输入数据库。现在我在数据库中有完整的数字,如果用户想要查看他们刚刚输入的数据,它应该在文本框中显示带有逗号的数据,但数据库中的数据不会更改。有没有办法让我这样做?
I have a form that has ten textboxes on it. I am using VS 2010 ASP.NET with C#. What I am trying to do is to have the textbox to display commas when a user types in numbers. I don't want the numbers with commas to be entered into the database. Right now I have full numbers in the database and if a user wants to see the data that they just entered it should show the data with the commas in the textbox but the data in the database is not changed. Is there a way for me to do this?