Skip to main content

Posts

Showing posts with the label populate treeview

Show parent child node value at runtime and populate treeview in asp.net

Show parent child node value at runtime and populate treeview in asp.net. This program is use to populate treeview at runtime using asp.net. you can try this code. Imports System.Data Imports System.Configuration Imports System.Web Imports System.Web.Security Imports System.Web.UI Imports System.Web.UI.WebControls Imports System.Web.UI.WebControls.WebParts Imports System.Web.UI.HtmlControls Imports System.Data.SqlClient Imports System.Web.UI.WebControls.TreeNode Partial Class Bibliography Inherits System.Web.UI.Page Dim clscmn1 As New clsCommon Dim cn As New clsConnection Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not IsPostBack Then PopulateRootLevel() Else Exit Sub End If End Sub Private Sub PopulateRootLevel() Dim dt1 As New DataTable() Dim objCommand As New SqlCommand("select PRODUCT_CATEGORY_CD,PRODUCT_CATEGORY,(select count(*) FROM PRODUCT_CATEGORY