Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Masking Controls

Status
Not open for further replies.

jfrost10

Programmer
Jun 3, 2001
2,004
CA
Hey gang,

Does anyone know if there's a way to mask an asp.net control, other than with a validator? I'd love my date fields to look like __/__/____. I'm pretty sure that since its only raw html that comes back (and last I checked, html text boxes didn't ahve a masking feature) it can't be done in the same manner as visual basic. But just wondering if anyone had some ideas, or if there's an answer with javascript maybe?

Thanks,

Jack
 
I've got some javascript functions for validating date edits, but nothing that does a mask edit. The advantage over a validator is that it's all done client side. I think validators can work client-side as well but I haven't been successfull :)

TealWren
 
Hey Teal,

yeah, I havn't found any mask edit solutions either.

My understanding of the validator controls in .NET is that they actually output javascript to the browser that checks the controls, but if the user has javascript turned off in their browsers, it will automatically check on the server again to make sure everything is ok.

They're neat controls, but they don't have 100% what I need
:(

jack
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top