Merge pull request #4453 from lambdageek/bug-49721
[mono.git] / mcs / class / System.Web / System.Web.UI.WebControls / SessionParameter.cs
index e56bfe1891f13ecea58219c52e99ff2df02414bb..156754611bf1a881dca6a44d66215e29baa6c9c2 100644 (file)
@@ -28,9 +28,9 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_0
 using System.Collections;
 using System.Collections.Specialized;
+using System.Data;
 using System.Text;
 using System.ComponentModel;
 
@@ -57,18 +57,23 @@ namespace System.Web.UI.WebControls {
                {
                        SessionField = sessionField;
                }
+
+               public SessionParameter (string name, DbType dbType, string sessionField) : base (name, dbType)
+               {
+                       SessionField = sessionField;
+               }
                
                protected override Parameter Clone ()
                {
                        return new SessionParameter (this);
                }
-               
-               protected override object Evaluate (HttpContext ctx, Control control)
+               protected internal
+               override object Evaluate (HttpContext context, Control control)
                {
-                       if (control == null || ctx.Session == null)
+                       if (context == null || context.Session == null)
                                return null;
                        
-                       return ctx.Session [SessionField];
+                       return context.Session [SessionField];
                }
                
                [DefaultValueAttribute ("")]
@@ -90,5 +95,5 @@ namespace System.Web.UI.WebControls {
                }
        }
 }
-#endif
+