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 8668829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:18:39+00:00 2026-06-12T18:18:39+00:00

I have an .aspx page which displays info from a database and lets users

  • 0

I have an .aspx page which displays info from a database and lets users add new items.

The page contains an updatepanel. In that updatepanel, there is a gridview and a panel with some input elements:

<asp:Panel runat="server" ID="NewPersonPanel" DefaultButton="NewPersonButton" Visible="false">
    <div id="newItemForm">
        <label for="NewPersonName">Name:</label>     
        <asp:TextBox ID="NewPersonName" runat="server" MaxLength="50" />         
        <asp:RequiredFieldValidator ID="RequiredName" EnableClientScript="true" ControlToValidate="NewPersonName" ErrorMessage="Name must not be empty" ValidationGroup="NewPersonValidationGroup" runat="server" /><br />

        <label for="NewPersonFirstName">First Name:</label>     
        <asp:TextBox ID="NewPersonFirstName" runat="server" MaxLength="50" />         
        <asp:RequiredFieldValidator ID="RequiredFirstName" EnableClientScript="true" ControlToValidate="NewPersonFirstName" ErrorMessage="First name must not be empty" ValidationGroup="NewPersonValidationGroup" runat="server" /><br />

        <div id="newPersonControls">
            <asp:LinkButton ID="NewPersonButton" ValidationGroup="NewPersonValidationGroup" runat="server" OnCommand="PersonGrid_Insert">Create</asp:LinkButton>
            <asp:LinkButton ID="HideInputFormButton" runat="server" OnCommand="HideInputForm">Cancel</asp:LinkButton>
        </div>
    </div>
</asp:Panel>

Without the validation elements, the page works just fine. When I add the validation, things get weird; when I try to click the ‘Create’ button while the fields are empty, the red validation messages appear but this kills ALL postback on the page. If I fill in the fields, the red text disappears but I can’t use any buttons anymore. Creating the new person, removing the form, sorting the grid, filtering the grid, grid paging…. all stops working. Using a debugger it doesn’t seem like there is ever any call to my code behind anymore so it looks like the failed validation does something in javascript that causes all the other “__doPostBack” methods to fail.

I did find this thread: asp.net: Postback disabled after validation failed but there was never any answer there.

  • 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-12T18:18:40+00:00Added an answer on June 12, 2026 at 6:18 pm

    Because you set validations you will not be able to postbacks.

    however you can disable them by using ValidatorEnable(object,true/false)

    this takes two parameters, first one is the object , second is whether to enable or disable.

    in your case it is false.

    but you have to do it for all controls in your form(for which you have set the validations) .

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

Sidebar

Related Questions

In my aspx page I have a gridview which displays the value from my
In my .aspx page which derives from a master page I have a contact
I have a child page LoginContent.aspx which contains a login form. If the user
Basically in my in my aspx page I have a gridview which displays the
I have a page ( Order.aspx ) which displays an order which has a
I'm new to SharpSVN, i have a aspx page in which i need to
I have a GridView on my aspx page which displays a collection of objects
I have the following script which displays data returned from a serverside page onto
I have the .aspx page which is already developed in VS 2008 with its
I have an ASPX page which has an iFrame in it the source of

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.