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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:36:35+00:00 2026-05-24T06:36:35+00:00

In my repeater’s ItemTemplate I’ve a CheckBox and a disabled TextBox, I need to

  • 0

In my repeater’s ItemTemplate I’ve a CheckBox and a disabled TextBox, I need to implement this idea: TextBox only gets enabled if the the CheckBox is checked .. so I set the CheckBox AutoPostBack to true and I tried to put this code in ItemDataBound. but I can’t find my control which is weird because I use the same code but in loop “MyRptr.Item[i].FindControl….” and it works! .. I don’t want to loop through all the Items, I just wish If I can know the Item number or location in which the CheckBox was created. and I’ve also tried to create an event handles for the CheckBox’s CheckedChanged event but I can’t find the CheckBox either!

protected void MyRptr_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            CheckBox ChkBx = e.Item.FindControl("IsSelected_ChkBx") as CheckBox;
            if (ChkBx.Checked == true)
            {
                TextBox TxtBx = e.Item.FindControl("Value_TxtBx") as TextBox;
                TxtBx.Enabled = true;
            }
        }


<asp:Repeater ID="MyRptr" runat="server" 
            onitemdatabound="MyRptr_ItemDataBound">
                <ItemTemplate>
                    <asp:CheckBox ID="IsSelected_ChkBx" runat="server" Text='<%# Eval("Item") %>' AutoPostBack="True" OnCheckedChanged="IsSelected_ChkBx_CheckedChanged" />
                    &nbsp;<asp:TextBox ID="Value_TxtBx" runat="server" Enabled="false"></asp:TextBox>
                    <asp:HiddenField ID="ID_HdnFld" runat="server" Value='<%# Eval("ID") %>' />
                </ItemTemplate>
                <SeparatorTemplate>
                    <br></br>
                </SeparatorTemplate>
            </asp:Repeater>

So basically I need a clean and simple way to implement my logic and If I could get an explanation for what’s happening it would be great, so any ideas =) ?

  • 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-24T06:36:36+00:00Added an answer on May 24, 2026 at 6:36 am

    You can find your textbox as follow, but I think its better use the jQuery instead of server-side event

    protected void IsSelected_ChkBx_CheckedChanged(object sender, EventArgs e)
    {
         var ch = (CheckBox)sender;
         var txt = ch.Parent.FindControl("Value_TxtBx") as TextBox;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Repeater Markup: <asp:Repeater ID=stat_Rptr runat=server> <ItemTemplate> <asp:CheckBox ID=IsSelected_ChkBx runat=server Text='<%# Eval(Item) %>' /> &nbsp;<asp:TextBox
I have a repeater which binds a set of data. Within this repeater is
I have a repeater, in each ItemTemplate of the repeater is an asp:checkbox with
I have a repeater: <asp:Repeater ID=rpt_Items OnItemCommand=rpt_Items_ItemCommand runat=server> <ItemTemplate> <div class=item> <div class=fr> <asp:TextBox
I have a repeater that holds a Radio button list, a textbox and a
I have a Repeater with a Button inside the ItemTemplate . I added the
I have a repeater with a checkbox inside of it. <tr class=datarow> <td style=display:
I have a nested repeater control. Here is what the HTML looks like: <ItemTemplate>
I have my repeater item template: <asp:Repeater ID=Linksrepeater runat=server> <HeaderTemplate><h2>Links</h2><ul> </HeaderTemplate> <ItemTemplate> <li><%#Container.DataItem(Category)%></li> </ItemTemplate>
My repeater structure is like this --------------------------------- | Repeater | --------------------------------- | Dropdownlist |

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.