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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T16:06:07+00:00 2026-05-17T16:06:07+00:00

I have a treeview control in my web application. I build this tree view

  • 0

I have a treeview control in my web application. I build this tree view dynamically.

Is there anyway to select a node and change the color of the selected node using javascript or any other method running in client side(i mean without post back).

i am using c# and asp.net to bulid my application

  • 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-17T16:06:07+00:00Added an answer on May 17, 2026 at 4:06 pm

    EDIT (To explain a little more on JQuery):

    JQuery is a .js file containing JavaScript functions to make it easier to navigate a document, select DOM elements, create animations, handle events, and develop Ajax applications.

    You can download JQuery.js file from JQuery official website, then reference to the JQuery.js file (like you reference to other .js file) before you call your first JQuery script, as followed:

    <script type="text/javascript" src="jQuery.js"></script>
    

    Or alternatively, you can use the JQuery.js file hosted by Google. This is what I did for my testing. Below is the complete code of my .aspx page:

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="TreeView.aspx.cs" Inherits="TreeView" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    
        <script type="text/javascript" 
            src="http://www.google.com/jsapi"></script>
        <script type="text/javascript">
            // You may specify partial version numbers, such as "1" or "1.3",
            //  with the same result. Doing so will automatically load the 
            //  latest version matching that partial revision pattern 
            //  (e.g. 1.3 would load 1.3.2 today and 1 would load 1.4.2).
            google.load("jquery", "1.4.2");
    
            google.setOnLoadCallback(function() {
                // Place init code here instead of $(document).ready()
    
                //change cursor to hand when user mouseover tree nodes
                $(".TreeView1_0").mouseover(function() {
                    $(this).css('cursor', 'pointer');
                });
    
    
                //unbold all nodes then bold the selected node to indicate it's selected
                $(".TreeView1_0").click(function() {
                    $(".TreeView1_0").css('font-weight', 'normal');
                    $(this).css('font-weight', 'bold');
                });
            });
        </script>
    
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <asp:TreeView ID="TreeView1" runat="server">
            </asp:TreeView>
        </div>
        </form>
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web application where I am using asp.net tree view control to
I have a TreeView control in my WinForms .NET application that has multiple levels
I have a legacy ASP web site that uses the treeview control from COMCTL32.OCX.
I have a tree view control that I would like to supply the background
I have a TreeView Control (that should look like this) But I don't know
I have a treeview control in a Windows Forms project that has checkboxes turned
I have a treeview control on an aspx page. The data comes from database
Using WPF, I have a TreeView control that I want to set its ItemTemplate
I have a TreeView windows forms control with an ImageList , and I want
I have a ASP.Net TreeView control that I am binding to an XML data

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.