milani_lucie
asked on
Value of type 'System.Web.UI.Control' cannot be converted to 'System.Web.UI.WebControls.TreeNode' !!
Hi,
I have the following:
Request("Id") => Which represents the ID of the TreeNode.
I want to get the TreeNode from this. I have used the following syntax but never works for me:
Dim node As TreeNode = CType(FindControl(Request( "Id")), TreeNode)
Error:
Value of type 'System.Web.UI.Control' cannot be converted to 'System.Web.UI.WebControls .TreeNode'
Can you please give me the correct syntax ?
Thanks
I have the following:
Request("Id") => Which represents the ID of the TreeNode.
I want to get the TreeNode from this. I have used the following syntax but never works for me:
Dim node As TreeNode = CType(FindControl(Request(
Error:
Value of type 'System.Web.UI.Control' cannot be converted to 'System.Web.UI.WebControls
Can you please give me the correct syntax ?
Thanks
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
that gives you a reference that will either be direct or that you should be able to drill through to what you need.