Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Formating TextBox
Message
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
00725586
Message ID:
00725650
Views:
27
This message has been marked as the solution to the initial question of the thread.
Hi Gregorio,

Formating controls in .NET is very different. Look at a prior message #670154 where it is explained how to format and parse values entered into controls.

Replace the information in the method to handle the formating with the following:
cevent.Value = Regex.Replace((string) cevent.Value, "(\d{3})(\d{2})(\d{4})", "$1-$2-$3");
>Sorry if I ask this question that probably somebody answer before but I dont find the thread here. I read the complete acknowlegbase of MS and did not show any example how to do. Just make you more confused than before start.
>
>They say that the property format that was used in VB 6 is now related to the class databinding, so I check my databinding of my control to see if I have any property that I can use to format my data entry but I did not find anything related.
>
>What I want to see is a simple example how to make a value like a social security number formated like 555-55-5555 if the user enter 555555555. Simple!! Why make so much explanation without make an example??
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform