Home - Forums-.NET - FlyTreeView (ASP.NET) - Unable to cast object of type 'Int64' to type 'String'

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

This forum related to following products: FlyTreeView for ASP.NET

Unable to cast object of type 'Int64' to type 'String'
Link Posted: 14-Aug-2008 07:59
I get this error when I add an attribute to a node with a value greater than 10 and then do a postback on the page.

Sys.WebForms.PageRequestManagerServerErrorException: Unable to cast object of type 'System.Int64' to type 'System.String'.

node.Attributes.Add("ID", "10") doesn't cause an exception

node.Attributes.Add("ID", "11") does cause an exception
Link Posted: 15-Aug-2008 01:03
For client-side, you should use node.getAttribute and node.setAttribute methods.

See the following page for details:
http://www.9rays.net/asp.net_2/treeview/miscpages/doc/ClientObjects.aspx
Link Posted: 15-Aug-2008 07:05
I'm setting attributes when the page loads and on the client if the user makes a change.
Link Posted: 15-Aug-2008 07:17
Ok, I've created a small test page that calls
node.Attributes.Add("ID", "11");
and there's no problem with this.

Could you please provide a test page that reproduces the issue? Or steps required to reproduce the issue?
This is always the fastest way to debug and fix possible bug.