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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:46:03+00:00 2026-06-17T07:46:03+00:00

I have created a DataList in asp.net – <asp:DataList runat=server ID=pTextBox> <ItemTemplate> <asp:CheckBox ID=CheckBoxPN

  • 0

I have created a DataList in asp.net –

<asp:DataList runat="server" ID="pTextBox">

<ItemTemplate>

<asp:CheckBox ID="CheckBoxPN" runat="server"  Checked='false' />
<asp:TextBox ID="profileTextBox" runat="server" Text='<%# Container.DataItem.ToString() %>'></asp:TextBox>&nbsp;


</ItemTemplate>
</asp:DataList>

This creates checkBoxes and textBoxes based on the string values passed through from a webService.

How can I get the profileTextBox Text string value when a user clicks CheckBoxPN and populate another textBox outwith the DataList on the page with the string value??

  • 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-17T07:46:04+00:00Added an answer on June 17, 2026 at 7:46 am

    You can use the CheckedChanged event of the CheckBox and cast it’s NamingContainer to DataListItem, the you just have to use FindControl to find a different server control:

    protected void CheckBoxPN_CheckedChanged(Object sender, EventArgs e)
    {
        CheckBox chk = (CheckBox) sender;
        DataListItem item = (DataListItem) chk.NamingContainer;
        TextBox txt = (TextBox) item.FindControl("profileTextBox");
        this.OtherTextBoxOnPage.Text = txt.Text; // here we are
    }
    

    By the way, this approach works with any web-databound control(Repeater, GridView, etc.)

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

Sidebar

Related Questions

I have a table that is created in a DataList in ASP.Net. This table
I have the following code which is created with a datalist control: http://jsfiddle.net/vmE2E/1/ But
I have created an asp.net site which works fine in internet explorer but for
I have a somewhat complex custom user control, created in C# .NET, which is
I'm using EPiServer for this website. Unlike asp:DataList , EPiServer:PAgeList does not have AlternatingItemTemplate
I have created a iframe to upload and display the images into the server
I am using a databound DataList in ASP.NET C# to create a tag cloud.
I am wondering how I can get the value from an asp.net textbox that
I have created a QWidget with a bunch of QToolButtons in it and I
I have created 3 classes as following Ext.mine.TextParent - Inherting from Textfield Ext.mine.child.TextChildA -

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.