from the install pacakage I have taken the umbraco.dll 1.0.4090.38017 and referenced it in visual studio 2010 project, I then wrote the follwiing code to loop through the Parent and its child nodes:
foreach (Node doc in ChNodes) { if (doc.Children.Count > 1) { text += doc.Name + "--";
} } Label1.Text = text;
when I compile the project in VS2010 I get the following error:
Error 1 The type 'umbraco.interfaces.INode' is defined in an assembly that is not referenced. You must add a reference to assembly 'interfaces, Version=1.0.4085.20549, Culture=neutral, PublicKeyToken=null'. C:\Software Development\trunk\UserControls\DocumentList.ascx.cs 57 13
How do I get rid of this error
Basically I want to read the document properties in csharp code and write it to format to diplay
UMBRACO.DLL 1.0.4085.20549 issue
HI I have installed umbraco 4.7
from the install pacakage I have taken the umbraco.dll 1.0.4090.38017 and referenced it in visual studio 2010 project, I then wrote the follwiing code to loop through the Parent and its child nodes:
Node CurNode = Node.GetCurrent();
Nodes ChNodes = CurNode.Children;
string text = null;
foreach (Node doc in ChNodes)
{
if (doc.Children.Count > 1)
{
text += doc.Name + "--";
}
}
Label1.Text = text;
when I compile the project in VS2010 I get the following error:
Error 1 The type 'umbraco.interfaces.INode' is defined in an assembly that is not referenced. You must add a reference to assembly 'interfaces, Version=1.0.4085.20549, Culture=neutral, PublicKeyToken=null'. C:\Software Development\trunk\UserControls\DocumentList.ascx.cs 57 13
How do I get rid of this error
Basically I want to read the document properties in csharp code and write it to format to diplay
you help is greatly appreciated
Kind Regards
Praveen
Hi Praveen,
You should also add a reference interfaces.dll from the install binaries the same way you referenced umbraco.dll in order to use INode.
Hope this helps,
Tom
Hi Tom
Thanks for your help, that worked like a charm :)
can you please help me with this one if you are able pleaseeeeeeeee
http://our.umbraco.org/forum/developers/api-questions/22416-CSharp-Code-to-loop-through-nodes
Again many thanks for your help
Kind Regards
Praveen
is working on a reply...