Wednesday, March 21, 2012

populate txtbox

I need to populate a txtbox using client side code. In txtbox1 I let the user select a date and I want to populate txtbox2. I want to do this on the client side, so txtbox2 is automatically populated without having to post back the page. This is how I was thinking about doing it. In the onTextChanged event in txtbox1, I'll call a javascript procedure to place this value in txtbox2...

txtbox2 = DateAdd(DateInterval.Day, 1, CDate(txtbox1.Text))

Is this the proper way to do this? Does anyone have an example?

thanks,
eyeI've used javascript but I normally find some code examples that I can adapt so I can't remember the exacxt way to do what you want. If you look at some javascript sites you should find it easily enough.

0 comments:

Post a Comment