* roottypes.cs: Rename from tree.cs.
[mono.git] / mcs / class / System.Web / System.Web.UI / TemplateControl.cs
index 6c629e05363228771cabb163513514f9b596f637..fc3aea5ea08bfe4bab7002e43c516af18227ca57 100644 (file)
@@ -73,6 +73,9 @@ namespace System.Web.UI {
 
                #region Properties
                [EditorBrowsable (EditorBrowsableState.Never)]
+#if NET_2_0
+               [Obsolete]
+#endif
                protected virtual int AutoHandlers {
                        get { return 0; }
                        set { }
@@ -230,14 +233,20 @@ namespace System.Web.UI {
                        return null;
                }
 
-               [MonoTODO]
                [EditorBrowsable (EditorBrowsableState.Never)]
-               public static object ReadStringResource (Type t)
+               public 
+#if !NET_2_0
+               static
+#endif
+               object ReadStringResource ()
                {
-                       if (t == null)
-                               throw new ArgumentNullException ("t");
+                       throw new NotSupportedException ();
+               }
 
-                       return null;
+               [EditorBrowsable (EditorBrowsableState.Never)]
+               public static object ReadStringResource (Type t)
+               {
+                       throw new NotSupportedException ();
                }
 
                [MonoTODO]
@@ -296,58 +305,30 @@ namespace System.Web.UI {
                }
 
 #if NET_2_0
-
-       Stack dataItemCtx;
-       
-       internal void PushDataItemContext (object o)
-       {
-               if (dataItemCtx == null)
-                       dataItemCtx = new Stack ();
-               
-               dataItemCtx.Push (o);
-       }
-       
-       internal void PopDataItemContext ()
-       {
-               if (dataItemCtx == null)
-                       throw new InvalidOperationException ();
-               
-               dataItemCtx.Pop ();
-       }
-       
-       internal object CurrentDataItem {
-               get {
-                       if (dataItemCtx == null || dataItemCtx.Count == 0)
-                               throw new InvalidOperationException ("No data item");
-                       
-                       return dataItemCtx.Peek ();
+               protected object Eval (string expression)
+               {
+                       return DataBinder.Eval (Page.GetDataItem(), expression);
                }
-       }
-       
-       protected object Eval (string expression)
-       {
-               return DataBinder.Eval (CurrentDataItem, expression);
-       }
        
-       protected object Eval (string expression, string format)
-       {
-               return DataBinder.Eval (CurrentDataItem, expression, format);
-       }
+               protected string Eval (string expression, string format)
+               {
+                       return DataBinder.Eval (Page.GetDataItem(), expression, format);
+               }
        
-       protected object XPath (string xpathexpression)
-       {
-               return XPathBinder.Eval (CurrentDataItem, xpathexpression);
-       }
+               protected object XPath (string xpathexpression)
+               {
+                       return XPathBinder.Eval (Page.GetDataItem(), xpathexpression);
+               }
        
-       protected object XPath (string xpathexpression, string format)
-       {
-               return XPathBinder.Eval (CurrentDataItem, xpathexpression, format);
-       }
+               protected string XPath (string xpathexpression, string format)
+               {
+                       return XPathBinder.Eval (Page.GetDataItem(), xpathexpression, format);
+               }
        
-       protected IEnumerable XPathSelect (string xpathexpression)
-       {
-               return XPathBinder.Select (CurrentDataItem, xpathexpression);
-       }
+               protected IEnumerable XPathSelect (string xpathexpression)
+               {
+                       return XPathBinder.Select (Page.GetDataItem(), xpathexpression);
+               }
 
                // IFilterResolutionService