Click here to Skip to main content
15,884,986 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
<%@ Register TagPrefix="iewc" Namespace="Microsoft.Web.UI.WebControls" Assembly="Microsoft.Web.UI.WebControls" %>

<iewc:TreeView ID="tvMenuTree" runat="server" >
    <iewc:TreeNode  Text="Help" ID="Help">
        <iewc:TreeNode  Text="Update"></iewc:TreeNode>
        <iewc:TreeNode  Text="Domains"></iewc:TreeNode>
        <iewc:TreeNode  Text="Sources"></iewc:TreeNode>
        <iewc:TreeNode  Text="Terms" ></iewc:TreeNode>
        <iewc:TreeNode  Text="Search for Terms"></iewc:TreeNode>
    </iewc:TreeNode>
</iewc:TreeView>


Element 'TreeNode' is not a known element. This can occur if there is a compilation error in the Web site, or the web.config file is missing.
Help me to solve this problem
Posted
Comments
Kasson 18-Jan-11 2:30am    
What error it shows.
swathi.N 18-Jan-11 3:34am    
Reply- It shows only warning "Element 'TreeNode' is not a known element. This can occur if there is a compilation error in the Web site, or the web.config file is missing"
.
When I execute the application,TreeView part is not visible in the browser. - swathi.N 12 mins ago
Shahriar Iqbal Chowdhury/Galib 18-Jan-11 3:18am    
which asp.net version you are using? Why you are using assembly ref? TreeView is a built in component. use asp:TreeView instead, if you extend TreeView to customize then you should use your custom class ref , not base class ref.
swathi.N 18-Jan-11 3:24am    
I am using 2.0 version

swathi,
<iewc:treeview xmlns:iewc="#unknown" />
what I saw is a WebUserControl, right? I saw that you forgot the Nodes property

Please try:
C#
<%@ Register TagPrefix="iewc" Namespace="Microsoft.Web.UI.WebControls" Assembly="Microsoft.Web.UI.WebControls" %>
<iewc:TreeView ID="tvMenuTree" runat="server" >
<nodes>
    <iewc:TreeNode  Text="Help" ID="Help">
        <iewc:TreeNode  Text="Update"></iewc:TreeNode>
        <iewc:TreeNode  Text="Domains"></iewc:TreeNode>
        <iewc:TreeNode  Text="Sources"></iewc:TreeNode>
        <iewc:TreeNode  Text="Terms" ></iewc:TreeNode>
        <iewc:TreeNode  Text="Search for Terms"></iewc:TreeNode>
    </iewc:TreeNode>
</Nodes>
</iewc:TreeView></nodes>


If it's still not help you, please try:
XML
<%@ Register TagPrefix="iewc" Namespace="Microsoft.Web.UI.WebControls" Assembly="Microsoft.Web.UI.WebControls" %>
<iewc:TreeView ID="tvMenuTree" runat="server" >
<nodes>
    <asp:TreeNode  Text="Help" ID="Help">
        <asp:TreeNode  Text="Update"></asp:TreeNode>
        <asp:TreeNode  Text="Domains"></asp:TreeNode>
        <asp:TreeNode  Text="Sources"></asp:TreeNode>
        <asp:TreeNode  Text="Terms" ></asp:TreeNode>
        <asp:TreeNode  Text="Search for Terms"></asp:TreeNode>
    </asp:TreeNode>
</iewc:TreeView>
</nodes>
 
Share this answer
 
v2
Comments
swathi.N 18-Jan-11 3:33am    
I tried by adding <nodes>,But I am getting an error.
"Invalid child with tagname nodes"
jerrykid 18-Jan-11 3:38am    
Try Nodes, not nodes , how about it?
swathi.N 18-Jan-11 4:02am    
same error I got as pevious
Did you try changing the tagprefix in the config file? That fixed the problem for me.
 
Share this answer
 
Comments
m@dhu 18-Jan-11 4:55am    
Probably this should be a comment rather than posting as an answer.
Take a look at this.It may help you!

http://blog.tentaclesoftware.com/archive/2010/07/21/95.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900