Results 1 to 2 of 2

Thread: RequiredFieldValidator?

  1. #1
    Join Date
    Dec 1969

    Default RequiredFieldValidator?

    HI,<BR><BR>I have 4 buttons in my application. What I need to do is:<BR>I have used "Required Field Validator" to display an error message if the Textbox1 is empty but button1 is submitted.<BR><BR>But what is happening is:<BR>If I just click button2 or button3, the Request Field Validator is activated ..which shud not happen. it shud be activated only if button1 is activated.<BR>How can I make this happen..?<BR>Please let me know..<BR><BR>Thanks,<BR><BR>Here is my code:<BR><BR>&#060;asp:RequiredFieldValidator id="RequiredFieldValidator3" style="Z-INDEX: 125; LEFT: 16px; POSITION: absolute; TOP: 472px"<BR> runat="server" ErrorMessage="RequiredFieldValidator" ControlToValidate="TextBox1"&#062;Please Enter a Test Name!&#060;/asp:RequiredFieldValidator&#062;

  2. #2
    Join Date
    Dec 1969

    Default RE: RequiredFieldValidator?

    for the buttons where validation is required set the "CausesValidation" property to true. And set the property to false for the other buttons.

Posting Permissions

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