Images in TreeNode
-
I want to display the my own .gif images in each of the treenode. Here is my code. And the image is not displayed in my treeview . string cmd = "select ISBN,Title,ImagePath from Metadata"; SqlDataAdapter adapter = new SqlDataAdapter(cmd, sqlConn); DataSet SearchBooks = new DataSet(); adapter.Fill(SearchBooks); if (SearchBooks.Tables.Count > 0) { foreach (DataRow row in SearchBooks.Tables[0].Rows) { TreeNode newNode = new TreeNode(row["Title"].ToString() , row["ISBN"].ToString()); newNode.PopulateOnDemand = true; newNode.ImageUrl= row["ImagePath"].ToString(); newNode.NavigateUrl = row["ImagePath"].ToString(); newNode.SelectAction = TreeNodeSelectAction.Expand; node.ChildNodes.Add(newNode); } } Where i am wrong. What should i do to view the image in the treenode. Please somebody guide me.
VanithaVasu