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

The Archive Base Latest Questions

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

i need to display a list of strings to a user. the user can

  • 0

i need to display a list of strings to a user. the user can select multiple strings. if a specific set of strings is selected a textbox will appear next to each string.

what i want to do is show the user a TREEVIEW with each node being one of the strings. they will select every string they want by checking the box.

the problem:
if the user selects specific checkboxes i need a textbox to appear to GET input from the user.

question: how do i get string input from the user with a treeview?

  • 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-26T03:10:13+00:00Added an answer on May 26, 2026 at 3:10 am

    A TreeView does not support including TextBoxes natively. You could use a JavaScript solution where you create client side text boxes and serialize the value mapping to an <asp:HiddenField />.

    Set up your TreeView and HiddenField:

    <asp:TreeView runat="server"
        ID="MyTreeView"
        ShowCheckBoxes="All"
        NodeStyle-CssClass="node">
        ...
    </asp:TreeView>
    <asp:Hidden runat="server" ID="TreeViewTextValues" />
    

    Some jQuery:

    $(".node :checkbox").click(function (e) {
        var node = $(this).closest(".node");
        if (this.checked) {
            $("<input/>").addClass("nodeTextBox").appendTo(node);
        }
        else {
            node.find("input.nodeTextBox").remove();
        }
    });
    $("form").submit(function (e) {
        var nodeText = $("input.nodeTextBox").map(function () {
            return encodeURIComponent(this.value);
        });
        $("input[type=hidden][id$=TreeViewTextValues]").val(nodeText.join("&"));
    });
    

    Some C#:

    var text = TreeViewTextValues.Value.Split('&').Select(s => Server.UrlDecode(s));
    // text.ElementAt(n) maps to MyTreeView.CheckedNodes[n]
    

    Untested, but hopefully a helpful start.

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

Sidebar

Related Questions

I need to display a few checkbox on a form and the user can
I need to display a list of dates, which I have in a table
I need to display the list of names which I am getting from the
I need to display a single list, ordered by date which contains different types
I need to display image and one button on fancybox popup but I can't
I have a requirement wherein I need to display a list of employees and
I'm creating a web page of interviews, where the user can answer a specific
EDIT: I believe I need help getting the selected element in the list I
i am developing one application with map view i need display the weather depends
I need to display short description like label and near it data associated with

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.