Click to See Complete Forum and Search --> : currency formating a text field


vbnov
September 29th, 2006, 02:30 PM
Guys,

I need a little help here. How can I currency format a text field?

It can be either while typing on that field or on the text field's lostfocus event(eventhough lostfocus event doesn't exist in asp.net, something similar to that)

Using asp.net/vb. Thanks!

cykophysh
October 2nd, 2006, 06:24 AM
Lost focus does exist in ASP.net, it's called Javascript onchange method :)

There are a variety of options you could use to achieve what you want.
You could write a javascript method that will do the conversion for you, or you could call your codebehind file from your javascript code.
Or you could call an Ajax method to do the change for you server side.
or you could use the compare validator on the form, and set it to monitor that text that has been inputted is in currency format!!