importing messaging-2008 branch to trunk.
[mono.git] / mcs / class / System.Web / System.Web.UI.HtmlControls / HtmlInputFile.cs
index f593c39f465486a1cd7ad7f365a932d3a9ede7be..f1d76bdecb6729cec1d33bcafe8942d37b3cf402 100644 (file)
@@ -154,10 +154,13 @@ namespace System.Web.UI.HtmlControls
                {
                        base.OnPreRender (e);
 
-                       if (Page != null) {
+                       if (Page != null && !Disabled) {
                                Page.RegisterRequiresPostBack (this);
+#if NET_2_0
+                               Page.RegisterEnabledControl (this);
+#endif
                        }
-
+                       
                        HtmlForm form = (HtmlForm) SearchParentByType (typeof (HtmlForm));
                        if (form != null && form.Enctype == "")
                                form.Enctype = "multipart/form-data";