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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:41:37+00:00 2026-05-13T08:41:37+00:00

Okay, here is my problem: I have a form that requires to have two

  • 0

Okay, here is my problem:

I have a form that requires to have two fieldsets that are almost identical but that collect different sets of data. These are contained in an UpdatePanel. The user enters the data in a form, and when they hit the “Add”
button, this row is inserted into DataTable. The user should be able to enter as many rows as she wishes.

Since they are almost identical, I first got one working correctly, and then I used it as the base for the second one.

The problem is that now they the “Add” button is only triggered once. When I try to hit it again, nothing happens. No postback occurs.

I did some reasearch, and they advised to do register the buttons to the script manager
ASP.Net button click event not firing

This didn’t solve the problem.

Any ideas of what else I can try?

Edit 3:
Solution:
The problem was asp:RegularExpressionValidator with EnabledClientScript=”true”. It seems that the the control’s javascript to validate collides and breaks the asp:Button’s javascript when the control is rendered. If I disabled the ClientScript, then the buttons work.

The suggestion to look into the life cycle lead me to the right answer. The problem was that there wasn’t any lifecycle happening on code behind. So after examining what the buttons renders into, it meant that it had to be a javascript related problem.

Edit 2:
I disabled the asp:Validation controls and it is working. Any insights into this?

Edit 1:

Here is some code relevant to the issue

the button markup:

<td >
            <asp:Button ID="btnPrNew" Text="Add" OnClick="btnPrNew_Click" runat="server" />
</td>

And this is function than handled the onclick event

protected void btnPrNew_Click(object sender, EventArgs e)
{
    if (prQuantityValidator.IsValid && prPriceValidator.IsValid)
    {
        permanentRepairs = newItemizedDT();
        permanentRepairsTotal = populateDT(gvEstimatePermanentRepairs,    permanentRepairs) + addNewPrRow(); ;

        updateSubtotal(totalPermanentRepairs, permanentRepairsTotal);

        bindData(permanentRepairs, gvEstimatePermanentRepairs);
        clearPrForm();
    }
    else
    {
        erErrorMessage.Text = "Please enter only number amounts in Quantity and Unit Price field.";
    }
}
  • 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-05-13T08:41:37+00:00Added an answer on May 13, 2026 at 8:41 am

    What’s happening in your page lifecycle events (i.e. Page_Init, Page_Load, Page_PreRender)?

    Are you handling stuff on every postback (are you checking Page.IsPostBack) which you should only handle on the first load of the page?

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

Sidebar

Related Questions

Okay here is the problem, I have images of different sizes, but that doesn't
Okay so here's my problem. I have a two global NSString variables. globalVariable1 //stores
Okay, so here's my problem: I have a list of members on a website,
I have a problem with (for me to complicated) MySql query. Okay, here is
Okay here is what I'm trying to do: I have a model object that
Okay so here's, the scenario I have a thumbnail that contains an artists profile
Okay so here is the problem I am having. I have several unit tests
Okay, I'm not doing anything fancy here, but it's driving me crazy that I
Okay, I have looked everywhere and tried almost every suggestion that I could find
Okay... So, I came across the following problem: I have one table that works

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.