如何在Visual Studio 2010中将文本框设置为掩码文本框? [英] How to make a textbox into a masktextbox in Visual Studio 2010?

查看:429
本文介绍了如何在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?

推荐答案

从数据库中检索数字后,继续询问Google [ ^ ]。
After retrieving the number from database, proceed to ask Google[^].


这篇关于如何在Visual Studio 2010中将文本框设置为掩码文本框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆