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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T13:26:47+00:00 2026-06-08T13:26:47+00:00

I have a repeater, and each item has a check box and radio button.

  • 0

I have a repeater, and each item has a check box and radio button.

  • the checkbox disable all the controls inside the item when checked (with auto post back)
  • the radio button display a popup once checked (also with auto post back).

The case is: if there is a radio button checked in any item of the repeater, the popup will display when I check the checkbox control to disable an item. During the postback, a checked radio button will cause the popup to display.

How can I prevent this? Checkbox should only disable the item not to display the popup.

My code

    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void rptr1_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {


            if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
            {
                Label lbl1 = (Label)e.Item.FindControl("lbl_dg_task");
                Label lbl2 = (Label)e.Item.FindControl("lbl_dg_seq");
                CheckBox chb = (CheckBox)e.Item.FindControl("chkb_NO");
                RadioButton l1 = (RadioButton)e.Item.FindControl("L1");
                RadioButton l2 = (RadioButton)e.Item.FindControl("L2");
                RadioButton l3 = (RadioButton)e.Item.FindControl("L3");
                RadioButton l4 = (RadioButton)e.Item.FindControl("L4");
                RadioButton r1 = (RadioButton)e.Item.FindControl("R1");
                RadioButton r2 = (RadioButton)e.Item.FindControl("R2");
                RadioButton r3 = (RadioButton)e.Item.FindControl("R3");
                RadioButton r4 = (RadioButton)e.Item.FindControl("R4");
                AjaxControlToolkit.ModalPopupExtender mpex = (AjaxControlToolkit.ModalPopupExtender)e.Item.FindControl("mpe1");

                if (l1.Checked)
                {
                    //pop.Enabled = true;
                    ModalPopupExtender1.Show();
                }


                if (chb.Checked == true)
                {

                    l1.Enabled = false;
                    l2.Enabled = false;
                    l3.Enabled = false;
                    l4.Enabled = false;
                    r1.Enabled = false;
                    r2.Enabled = false;
                    r3.Enabled = false;
                    r4.Enabled = false;
                    lbl1.CssClass = "grayedout";
                    lbl2.CssClass = "grayedout";


                }
                else
                {
                    l1.Enabled = true;
                    l2.Enabled = true;
                    l3.Enabled = true;
                    l4.Enabled = true;
                    r1.Enabled = true;
                    r2.Enabled = true;
                    r3.Enabled = true;
                    r4.Enabled = true;
                    lbl1.CssClass = "seq";
                    lbl2.CssClass = "task";


                }
            }


        }


    protected void rptr1_PreRender(object sender, EventArgs e)
    {

            foreach (RepeaterItem item in rptr1.Items)
            {
                if (item.ItemType == ListItemType.AlternatingItem || item.ItemType == ListItemType.Item)
                {
                    CheckBox chb = (CheckBox)item.FindControl("chkb_NO");
                    Label lbl1 = (Label)item.FindControl("lbl_dg_task");
                    Label lbl2 = (Label)item.FindControl("lbl_dg_seq");
                    RadioButton l1 = (RadioButton)item.FindControl("L1");
                    RadioButton l2 = (RadioButton)item.FindControl("L2");
                    RadioButton l3 = (RadioButton)item.FindControl("L3");
                    RadioButton l4 = (RadioButton)item.FindControl("L4");
                    RadioButton r1 = (RadioButton)item.FindControl("R1");
                    RadioButton r2 = (RadioButton)item.FindControl("R2");
                    RadioButton r3 = (RadioButton)item.FindControl("R3");
                    RadioButton r4 = (RadioButton)item.FindControl("R4");
                    AjaxControlToolkit.ModalPopupExtender mpex = (AjaxControlToolkit.ModalPopupExtender)item.FindControl("ModalPopupExtender1");


                    if (chb.Checked == true)
                    {
                        l1.Enabled = false;
                        l2.Enabled = false;
                        l3.Enabled = false;
                        l4.Enabled = false;
                        r1.Enabled = false;
                        r2.Enabled = false;
                        r3.Enabled = false;
                        r4.Enabled = false;
                        l1.Checked = false;
                        lbl1.CssClass = "grayedout";
                        lbl2.CssClass = "grayedout";

                    }
                    else
                    {
                        l1.Enabled = true;
                        l2.Enabled = true;
                        l3.Enabled = true;
                        l4.Enabled = true;
                        r1.Enabled = true;
                        r2.Enabled = true;
                        r3.Enabled = true;
                        r4.Enabled = true;
                        lbl1.CssClass = "seq";
                        lbl2.CssClass = "task";


                    }

                    if (l1.Checked)
                    {

                        //pop.Enabled = true;
                        ModalPopupExtender1.Show();


                    }

                }
            }
        }
  • 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-08T13:26:49+00:00Added an answer on June 8, 2026 at 1:26 pm

    Don’t use the PreRender event to decide whether to show the popup, but use the OnCheckedChanged event of the radio button to show it.

    l1.CheckedChanged = (sender, e) => { if (l1.Checked) ModalPopupExtender1.Show(); };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a repeater and each item contains a button which should redirect to
I have a repeater and an unbound checkbox in each item. I want to
I have a cart Repeater , where every item has a couple of controls
I have a repeater, in each ItemTemplate of the repeater is an asp:checkbox with
I have a repeater for different updates identified by Update_ID. Each Update_ID has a
I have asp.net repeater on a page. If each item being repeated is wrapped
I have a table with items in a row, each item have a button.
I have a Datalist and I am trying to insert a checkbox for each
I have a jquery tab on my page, where each list item contains a
I have a list of items in an IList<>.Each listitem has a date and

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.