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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T08:43:32+00:00 2026-05-11T08:43:32+00:00

I have a donation form that contains an update panel that contains a dropdown

  • 0

I have a donation form that contains an update panel that contains a dropdown for predetermined amounts plus the ‘Other’ option’. When ‘Other’ is selected the dropdown has triggered the partial postback and renders the update panel with the additional ‘Other’ textbox for the amount. Outside this update panel I have a additional server control form fields such as textboxes and a button for submission.

The bug I run into is when ‘Other’ is selected the button ‘onclick’ event fails to fire a full postback.

Example:

<asp:UpdatePanel ID='updatePanelAmount' runat='server'>     <ContentTemplate>         <table style='width: 500px;'>         <tbody>         <tr>             <th style='width: 200px;'><asp:Label ID='lblAmount' runat='server' CssClass='required' Text='Donation Amount: ' /></th>             <td>                 <asp:DropDownList ID='selAmount' runat='server' />                 <asp:CustomValidator ID='valDonationAmount' runat='server' ControlToValidate='selAmount' ErrorMessage='Donation Amount' Display='None' />             </td>         </tr>         </tbody>         </table>                 <asp:Panel ID='panelOther' runat='server' Visible='false'>             <table style='width: 500px;'>             <tbody>             <tr>                 <th style='width: 200px;'><asp:Label ID='lblOther' runat='server' Text='Other Amount: ' /></th>                 <td>                     $<asp:TextBox ID='txtOther' runat='server' />                     <asp:RequiredFieldValidator ID='valOther' runat='server' ControlToValidate='txtOther' Display='None' ErrorMessage='Other Amount' Enabled='false' />                     <asp:RegularExpressionValidator ID='valOtherExpress' runat='server' ControlToValidate='txtOther' Display='None' ErrorMessage='Other Amount: Invalid' ValidationExpression='[1-9][0-9]+(\.[0-9]{2})?' Enabled='false' />                 </td>             </tr>             </tbody>             </table>         </asp:Panel>                     </ContentTemplate>            </asp:UpdatePanel>     <ctl:CreditCardForm ID='ctlCreditCardForm' runat='server' /> <asp:Button ID='btnSubmit' runat='server' Text='Donate' /> 

EDIT: Posting the code-behind might make is easier for everyone

public partial class _Default : System.Web.UI.Page {     private ArrayList _donations;      protected void Page_Init(object sender, EventArgs e)     {         valDonationAmount.ServerValidate += new ServerValidateEventHandler(valDonationAmount_ServerValidate);                 selAmount.AutoPostBack = true;         selAmount.SelectedIndexChanged += new EventHandler(selAmount_SelectedIndexChanged);         updatePanelAmount.UpdateMode = UpdatePanelUpdateMode.Conditional;         updatePanelAmount.ChildrenAsTriggers = true;         btnSubmit.Click += new EventHandler(btnSubmit_Click);     }      void selAmount_SelectedIndexChanged(object sender, EventArgs e)     {         if (selAmount.SelectedItem.Text == 'Other')         {             panelOther.Visible = true;             valOther.Enabled = true;             valOtherExpress.Enabled = true;         }         else         {             panelOther.Visible = false;             valOther.Enabled = false;             valOtherExpress.Enabled = false;         }     }      void valDonationAmount_ServerValidate(object source, ServerValidateEventArgs args)     {         args.IsValid = true;         if (args.Value == '0')         {             args.IsValid = false;         }     }      void btnSubmit_Click(object sender, EventArgs e)     {         Page.Validate();                          if (Page.IsValid)         {          }     }      protected void Page_Load(object sender, EventArgs e)     {             _donations = new ArrayList();         double[] donations = new double[] { 20.00, 50.00, 100.00, 250.00, 500.00 };         _donations.AddRange(donations);          if (!IsPostBack)         {             foreach (Double d in _donations)             {                 selAmount.Items.Add(new ListItem(String.Format('{0:c}', d), String.Format('{0:c}', d)));             }             selAmount.Items.Insert(0, new ListItem('Select Donation Amount','0'));             selAmount.Items.Add(new ListItem('Other', 'Other'));         }             } } 
  • 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. 2026-05-11T08:43:32+00:00Added an answer on May 11, 2026 at 8:43 am

    Is this possibly a validator blocking you? Is your button supposed to ignore any validators? If so, you should set CausesValidation=’false’ on the button so that it will fire even if the validators in the panel are invalid.

    Otherwise, the button’s click event will be stopped by the validators in the panel.

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

Sidebar

Related Questions

I have a donation form which users fill out and I would like to
My simple donation form submits properly except for Internet Explorer. I'm sure it has
I have an donate application script that has all its files in one Folder
I have a table Donations which has a CampaignID column that relates to the
I have a donation script at this moment where the user inputs the donation
I have a CSS <ul> <li> nested menu that works perfectly in IE 8
I have a client that needs SSL to protect online donations, but I have
I'm involved in building a donation form for non-profits. We recently got hit by
I have data of this form: Category Source Amount Dues FTW $100 Donations ODP
I have a user signup form, and I need to insert a function to

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.