JavaScript question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi. I have a page with 3 fields and a submit button. The user fills in the 3 fields and clicks the submit button
I process the data and do a server.transfer call upon valid input. If input was invalid, I should display an error message to the user. I currently have

sub btnSubmit_Click..
if dataprocess(arguments) the
server.transfe
els
lblInvalidStatus.visible = tru
end su

So, I'm setting an "invalid input" label to visible. How can I display a JavaScript alert box instead
Thank
Jenna
 
Use the validation controls in conjunction with the ValidationSummary
control. The ValidationSummary has a property called ShowMessageBox that
will do this for you. If you need to do custom validation you still can,
use the CustomValidator.

-John Oakes


JennaS said:
Hi. I have a page with 3 fields and a submit button. The user fills in the
3 fields and clicks the submit button.
I process the data and do a server.transfer call upon valid input. If
input was invalid, I should display an error message to the user. I
currently have:
 
Back
Top