Wrox Programmer Forums
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 21st, 2006, 06:43 AM
Registered User
 
Join Date: Aug 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default treeview


i have a problem with treeview in asp .net.
i derive TreeNode class to MyTreeNode, and add some fields.
then i add MyTreeNode objects to the treeview instead of TreeNode objects.
in the
protected void TreeView1_TreeNodeExpanded(object sender, TreeNodeEventArgs e)

event i use

((MyTreeNode) e.Node.ChildNodes[i]).Kod

but i got the the following error

Unable to cast object of type 'System.Web.UI.WebControls.TreeNode' to type 'MyTreeNode'.

can you help me?









Similar Threads
Thread Thread Starter Forum Replies Last Post
treeview mahmutmol ASP.NET 2.0 Professional 0 August 21st, 2006 06:46 AM
treeview SAIGORTI SQL Language 2 September 6th, 2005 07:31 PM
TreeView - Please help dotnetprogrammer VS.NET 2002/2003 1 September 5th, 2005 09:02 AM
Treeview dkr72 VBScript 0 November 9th, 2004 12:07 PM
treeview MANOJMETAL ADO.NET 1 April 17th, 2004 08:46 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.