'Controls' is not a member of 'Microsoft.Web.UI.WebControls.TreeNode'

  • Thread starter Thread starter Patrick Olurotimi Ige
  • Start date Start date
P

Patrick Olurotimi Ige

When compiling this VB code below i get error:-
'Controls' is not a member of 'Microsoft.Web.UI.WebControls.TreeNode'
Any ideas what i'm doing wrong..if i use Controls in C# it works!!


Dim lnk As HyperLink = New HyperLink
lnk.NavigateUrl = rowProd("ProductName")
lnk.Text = ("ProductName")
Error here ----> nodeProd.Controls.Add(lnk)
 
The message is pretty clear. Class Microsoft.Web.UI.WebControls.TreeNode
doesn't include a member called Controls. And MSDN Library has a note

"Microsoft Internet Explorer WebControls are not currently supported."

on every screen related to Microsoft.Web.UI.WebControls. How can you expect
it to work properly?

Eliyahu
 
Eliyahu,
Yes i know the error is clear!
But my question is it doesn't work for me in VB but in C# it doesn't.
How should i specify :- nodeProd.Controls.Add(lnk)
in VB?
 
Back
Top