refactoring: Button, ImageButton and LinkButton are used insted internal DataControlB...
[mono.git] / mcs / class / System.Web / System.Web.UI.WebControls / XmlHierarchyData.cs
index 911774d6ab20369e6acd995060b6617316dc5f67..42de7beefd9d25f1975932c255897a88f336a536 100644 (file)
@@ -140,9 +140,24 @@ namespace System.Web.UI.WebControls {
                        get { return item; }
                }
                
-               [MonoTODO]
                string IHierarchyData.Path {
-                       get { throw new NotImplementedException (); }
+                       get { 
+                               System.Text.StringBuilder sb = new System.Text.StringBuilder();
+                               XmlNode nod = item;
+                               do {
+                                       int n=1;
+                                       XmlNode prev = nod.PreviousSibling;
+                                       while (prev != null) {
+                                               prev = prev.PreviousSibling;
+                                               n++;
+                                       }
+
+                                       sb.Insert (0, "/*[position()=" + n + "]");
+                                       nod = nod.ParentNode;
+                               } while (nod != null && !(nod is XmlDocument));
+                               
+                               return sb.ToString ();
+                       }
                }
                
                string IHierarchyData.Type {