Change labelStatus if Page.isValid = False

Results 1 to 2 of 2

Thread: Change labelStatus if Page.isValid = False

  1. #1
    Join Date
    Dec 1969

    Default Change labelStatus if Page.isValid = False

    My form has several RequiredFieldValidators for each of my text fields. At the bottom I have a label to display the status. (i.e. Data Saved! or Could not complete your request!) I&#039;m trying to make my label say "Check for errors or check for missing data that is required" if any of the text fields do not validate. Since my RequiredFieldValidators are at the top of my page, when the user clicks Submit, he won&#039;t see the RequiredFieldValidator.Text value. He has to scroll up to the top of the page to see what is wrong...when he gets to the top then he realizes that data is required. If my labelStatus could at least say "Check for errors or Check for required data" then he would instantly know that he missed a field.<BR>Is it possible to check if any of the RequiredFieldValidators &#062; "" THEN labelStatus = "Check for required data." Or could I do something like Page.isValid = False THEN labelStatus.Text = "Check for missing data." Is this possible?

  2. #2

    Default RE: Change labelStatus if Page.isValid = False

    A ValidationSummary control might help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts