Wednesday, March 21, 2012

How can I make a masked label in web forms?

I'm developing a web site using AJAX and I need to display some data in a label but the data must be displayed with a mask.

For example, if I have two textboxes and I wanna do a sum between then, the label must display the result. But, I don't know what can I do to use a masked label.

If somebody can help me I'll be very thankful.

Thanks in advanced

i dont know if i completely understand you. you say you need a lable to display a sum but you want it masked? what exactly do you mean by masked.

a masked label is a lable that replaces certain (or all) characters with something else. For example a credit card number in a masked label could look like

***** ***** **** 3182

you can use a simple string.Replace method, or regular expressions to mask the label. Textboxes even have a Password Type which will mask everything typed into them automatically

What exactly do you want to mask in your label?

No comments:

Post a Comment