0

Assume that i am creating 2 Panel which depends on which buttons ( 2 buttons ) user clicked..
if the user click button 1, panel 1 will visible and panel 2 will not be visible.. same to the button 2..
but it can't be work don't know due to what, i had tried many of others pattern of the visible still cannot be work. :/

here is my .css coding

 protected void radCreditCard_CheckedChanged(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (radCreditCard.Checked == true)
                {
                    pnlCreditCard.Visible = true;
                    pnlPayPal.Visible = false;
                }
                else
                {
                    pnlCreditCard.Visible = false;
                    pnlPayPal.Visible = true;
                }
            }


        }

        protected void radPaypal_CheckedChanged(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {

                if (radPaypal.Checked == true)
                {
                    pnlCreditCard.Visible = false;
                    pnlPayPal.Visible = true;
                }
                else
                {
                    pnlCreditCard.Visible = true;
                    pnlPayPal.Visible = false;
                }
            }
        }

and this is my deisgn code.

  <asp:Panel ID="pnlCreditCard" runat="server" Visible="False">Credit Card</asp:Panel>
             <asp:Panel ID="pnlPayPal" runat="server" Visible="False"></asp:Panel>
1
Contributor
1
Reply
2
Views
4 Years
Discussion Span
Last Post by gahhon
0

i've solve the problem already, since i do it in server-side..
so i have put the AutoPostBack="true" for both radiobutton

but i have a problem,
how can i create a new function in css file combine both of them function (CheckedChanged) and call this function at .aspx?

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.