Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: ASP Text Box


Message #1 by "Rinku Kadakia" <rinku.kadakia@p...> on Tue, 24 Dec 2002 14:03:02
Hello everyone,

Can someone please help? I am having a little problem here. I have six 
text boxes named txtdata1 to txtdata6.

Before I can hit Submit () I want to make sure that each of them has some 
value. if it doesn't then give an error message and focus to that text box.
I can test each text field individually but these text boxes are generated 
dynamically so its not always 6 text boxes.

Can someone help me to write a loop to test these text boxes?
Individual code

if Len(frmUpdate.txtdata1.value) = 0 then
   Alert "This field cannot be empty so please enter the data."
   frmUpdate.txtdata1.focus
   Exit Sub
end if	

Thanks
Rinku 

  Return to Index