How to get value from Multi Node Tree Picker using C#
Trying to do a bit complex page usinbg Usercontrol with C#.. Can anyone please tell me how to get the node ids from Multi Node Tree Picker... The Property Value is as follows
When using C# to access the MNTP values, is is easier to retrive the values as csv. You can change the output behavior on the datatype. Then, instead of getting some xml returned you will simply get a string like so: "1285,3233,5443". Let me know if you have more questions regarding this.
Thank you for your reply.. yes thats a nice option and it will be really easy.. but unfortunately we already have a number of XSLT functionalities based on the MNTP XML output structure and changing it to CSV will break it all.. The only option for me now is to read it from XML..
But the good news is that I have already found a way for this using XPathNodeIterator
private string getValueFromTreePicker(String mntpXml) { byte[] byteArray = new byte[mntpXml.Length]; System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding(); byteArray = encoding.GetBytes(mntpXml); MemoryStream memoryStream = new MemoryStream(byteArray); memoryStream.Seek(0, SeekOrigin.Begin);
XPathDocument document = new XPathDocument(memoryStream); XPathNavigator navigator = document.CreateNavigator();
How to get value from Multi Node Tree Picker using C#
Trying to do a bit complex page usinbg Usercontrol with C#.. Can anyone please tell me how to get the node ids from Multi Node Tree Picker... The Property Value is as follows
I want to get the nodeId using C#.. Please help
Hey there
When using C# to access the MNTP values, is is easier to retrive the values as csv.
You can change the output behavior on the datatype.
Then, instead of getting some xml returned you will simply get a string like so: "1285,3233,5443".
Let me know if you have more questions regarding this.
Hope this helps.
/Mads
Hi Mads,
Thank you for your reply.. yes thats a nice option and it will be really easy.. but unfortunately we already have a number of XSLT functionalities based on the MNTP XML output structure and changing it to CSV will break it all.. The only option for me now is to read it from XML..
But the good news is that I have already found a way for this using XPathNodeIterator
Ahh ok, I see, good that you found a solution :)
is working on a reply...