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

  • Home
  • SEARCH
  • 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 6092391
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:26:13+00:00 2026-05-23T12:26:13+00:00

The answer is probably obvious but I have not seen anything I could use

  • 0

The answer is probably obvious but I have not seen anything I could use except the opposite – manipulating the parent from the child – so I’m posting new.

I have a shopping cart system I’m working on that my company purchased and I’m new to .NET so I may not even ask this properly.

My store has a page in the checkout portion that looks basically like this:

PaymentPage.ascx:

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="PaymentPage.ascx.cs" Inherits="ConLib_PaymentPage" %>
<%@ Register Assembly="CommerceBuilder.Web" Namespace="CommerceBuilder.Web.UI.WebControls" TagPrefix="cb" %>
<%@ Register Src="~/Checkout/PaymentForms/CreditCardPaymentForm.ascx" TagName="CreditCardPaymentForm" TagPrefix="uc" %>
<ajax:UpdatePanel ID="PaymentAjax" runat="server">
    <ContentTemplate>

            On page controls, etc.
            Then a checkbox saying they've read the terms and agree:
    <div id="terms">
        <asp:CheckBox ID="AgreeTerms" runat="server" Text="I agree to the Terms Of Service" CssClass="Terms" AutoPostBack="True" OnCheckedChanged="AgreeTerms_Clicked"/>
    </div>

The task I want to accomplish is in the OnCheckedChanged event I want to enable or disable an imagebutton inside the CreditCardPaymentForm control.

That code looks like this:

<%@ Control Language="C#" ClassName="CreditCardPaymentForm" EnableViewState="false" %>
<%@ Register Assembly="CommerceBuilder.Web" Namespace="CommerceBuilder.Web.UI.WebControls" TagPrefix="cb" %>
<%@ Register assembly="wwhoverpanel" Namespace="Westwind.Web.Controls" TagPrefix="wwh" %>

... a <script> block with some code and then HTML

<span class="TTAActionButton">
    <br>
    <asp:ImageButton ID="CreditCardButton" runat="server" ToolTip="Pay With Card" SkinID="TTAPlaceOrder" OnClick="CreditCardButton_Click" />
    <asp:HiddenField runat="server"  ID="FormIsSubmitted" value="0" />
    <br /><br /><br />
</span>

I want to be able to turn the CreditCardButton on and off depending on whether the checkbox is checked. I would have a routine in the page codebehind like:

public void AgreeTerms_Clicked(object sender, EventArgs e)
{
    if (AgreeTerms.Checked)
        CreditCardButton.Enabled = false;
}

but every permutation of that I try has failed.

I have abbreviated the code but if I’ve left out too much please let me know.

Thanks for your help and if you assume I know nothing about .NET then double-thanks!
Jim

  • 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-23T12:26:14+00:00Added an answer on May 23, 2026 at 12:26 pm

    In the CreditCardPaymentForm control create a property that exposes the CreditCardButton visibility and than use that from the parent in the OnCheckedChanged function handler.

    public bool ShowCreditCardButton
    {
       get { return CreditCardButton.Visable; }
       set { CreditCardButton.Visable = value; }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This probably has a simple answer, but I must not have had enough coffee
The answer to this is probably right under my nose, but I am not
This is probably a simple answer but I can't find it. I have a
Okay, so the answer is probably obvious, but I don't know the correct way
This is probably really simple, and the answer is probably really obvious, but I'm
There is probably a reeeeeally obvious answer to this, but I can't find it,
This has probably been answer already but I am trying to return the primary
This is probably a simple one to answer, but I'm stuck, so here goes.
This is probably got a simple answer to it, but I am having problems
Probably it has been asked before but I cannot find an answer. Table Data

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.