Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8992233
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:54:24+00:00 2026-06-15T22:54:24+00:00

I have a form with one multiline textbox, one button and two validators. I

  • 0

I have a form with one multiline textbox, one button and two validators.
I have the following markup:

    <asp:RequiredFieldValidator ID="vldQuestionTextRequired" runat="server" ControlToValidate="tbmQuestionText"
        Display="Dynamic"></asp:RequiredFieldValidator>
<asp:CustomValidator ID="vldNotHintText" runat="server" ControlToValidate="tbmQuestionText"
        Display="Dynamic" EnableClientScript="true" OnServerValidate="HintText_ServerValidate"
        ClientValidationFunction="HintText_ClientValidate"></asp:CustomValidator>
        <span class="eq_ad_question_field_bg">&nbsp;&nbsp;&nbsp;&nbsp;</span>
        <asp:TextBox ID="tbmQuestionText" runat="server" CssClass="eq_ad_question_field"
            TextMode="MultiLine"></asp:TextBox>

The client side validation JS looks like this:

function HintText_ClientValidate(sender, e)
{
    if(e.Value != null)
        e.IsValid = e.Value != '<%= InstructionalText %>';
    else
        e.IsValid = false;
}

When I click the button without modifying the original hint text I get the correct validator error message, and the focus goes back to the textbox. If I then write something in the textbox and then click the button, the validator gets reevaluated and disapears, but no postback happens. If I click the button again, I get the postback.

Has any one seen this behavior before?
Thank you!

Edit: I found that if I make the validators static instead of dynamic, the button works. Is there any way to get around this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T22:54:25+00:00Added an answer on June 15, 2026 at 10:54 pm

    Well this textbox had some javascript to make it elastic. This javascript fiered on the onblur event in order to remove unsused space, and since the textbox was changing, the postback was stopped. The minimization of the textbox was not a requirement to begin with, so I removed it and the postback worked great.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have windows form with one textbox(Pname) and one button. I have one class
I have one form with four textbox and every textbox has requirefieldvalidator. One Button
I have one form with several text fields and one button. When i enter
I've creating one ASP web application, in that application one form have to update
I have two buttons at the top of a jQuery validated form: one saves
I am trying to have two submit buttons in my form - one accepts
I have one form and two submit buttons. at the moment they are like
I have one form that has several elements and two submit buttons, one is
i have one form after clicking save button form redirecting to another page, but
I have one form where in select box in which I have two options

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.