please help

Results 1 to 2 of 2

Thread: please help

  1. #1
    Join Date
    Dec 1969

    Default please help

    I want to convert this code asp.i understand that the tree view is not available in asp but i am trying to create a site map like structure from database.Please help its very urgent.Any help appreciated<BR><BR><BR>Private Sub PopulateTreeView(ByVal inParentID As Integer, ByRef inTreeNode As TreeNode)<BR> Dim DSNASPSearch As DataSet<BR> Dim CNASPSearch As New SqlClient.SqlConnection("server=GOLDMINE;database= documentmanagement;user=sa")<BR> Dim DACategories As New SqlClient.SqlDataAdapter("SELECT node, name, Parentnode FROM documenttype Where Parentnode = " & inParentID, CNASPSearch)<BR> DSNASPSearch = New DataSet<BR> CNASPSearch.Open()<BR> DACategories.Fill(DSNASPSearch, "documenttype")<BR> &#039;Close the connection to the data store; free up the resources <BR> CNASPSearch.Close()<BR> Dim parentrow As DataRow<BR> Dim ParentTable As DataTable<BR> ParentTable = DSNASPSearch.Tables("documenttype")<BR> For Each parentrow In ParentTable.Rows<BR> Dim parentnode As TreeNode<BR> &#039;we&#039;ll provide some text for the tree node. <BR> Dim strLabel As String = parentrow.Item(1)<BR> parentnode = New TreeNode(strLabel)<BR> inTreeNode.Nodes.Add(parentnode)<BR> &#039;set the tag property for the current node. This comes in useful if <BR> &#039;you want to pass the value of a specific record id. <BR> &#039;since the tag value is not visible, in the TreeView1_AfterSelect event <BR> &#039;you could pass the value to another sub routine, for example: &#039;FillDataGrid(TreeView1.SelectedNode.Tag) <BR> parentnode.Tag = parentrow.Item(0) &#039;call the routine again to find childern of this record. <BR> PopulateTreeView(parentrow.Item(0), parentnode)<BR> Next parentrow<BR><BR> End Sub

  2. #2
    Join Date
    Dec 1969

    Default RE: please help

    ASP?<BR><BR><BR>Have you seen what else is available?<BR><BR>Craig.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts