Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs
diff options
context:
space:
mode:
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2004-05-14 08:32:32 +0400
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2004-05-14 08:32:32 +0400
commitf186acc44a5ccaf2692027c285e6c083716b245f (patch)
tree80cb1e47f059abeacb5a79a042321be677ca5d65 /mcs
parent46d5c0775ae06b645d2fc3445ba1338501769dd9 (diff)
2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* HtmlForm.cs: default value for Enctype is "". * HtmlInputFile.cs: if no one set the encoding type for the HtmlForm, we set it to "multipart/form-data". Fixes bug #58359. svn path=/trunk/mcs/; revision=27332
Diffstat (limited to 'mcs')
-rw-r--r--mcs/class/System.Web/System.Web.UI.HtmlControls/ChangeLog6
-rw-r--r--mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlForm.cs2
-rwxr-xr-xmcs/class/System.Web/System.Web.UI.HtmlControls/HtmlInputFile.cs13
3 files changed, 20 insertions, 1 deletions
diff --git a/mcs/class/System.Web/System.Web.UI.HtmlControls/ChangeLog b/mcs/class/System.Web/System.Web.UI.HtmlControls/ChangeLog
index 8981c5e4b19..6565a2b0a34 100644
--- a/mcs/class/System.Web/System.Web.UI.HtmlControls/ChangeLog
+++ b/mcs/class/System.Web/System.Web.UI.HtmlControls/ChangeLog
@@ -1,3 +1,9 @@
+2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * HtmlForm.cs: default value for Enctype is "".
+ * HtmlInputFile.cs: if no one set the encoding type for the HtmlForm,
+ we set it to "multipart/form-data". Fixes bug #58359.
+
2004-01-15 Alon Gazit <along@mainsoft.com>
* HtmlForm.cs: The property name always return the value of the
property UniqueID.
diff --git a/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlForm.cs b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlForm.cs
index c6a21961a13..46f42b65add 100644
--- a/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlForm.cs
+++ b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlForm.cs
@@ -115,7 +115,7 @@ namespace System.Web.UI.HtmlControls{
if (attr != null){
return attr;
}
- return null;
+ return "";
}
set{
Attributes["enctype"] = AttributeToString(value);
diff --git a/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlInputFile.cs b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlInputFile.cs
index 03946214572..e1e009316a7 100755
--- a/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlInputFile.cs
+++ b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlInputFile.cs
@@ -80,6 +80,19 @@ namespace System.Web.UI.HtmlControls{
}
}
+ protected override void OnPreRender (EventArgs e)
+ {
+ base.OnPreRender (e);
+ for (Control ctrl = this.Parent; ctrl != null && !(ctrl is Page); ctrl = ctrl.Parent) {
+ if (!(ctrl is HtmlForm))
+ continue;
+
+ HtmlForm form = (HtmlForm) ctrl;
+ if (form.Enctype == "")
+ form.Enctype = "multipart/form-data";
+ break;
+ }
+ }
#if NET_1_1
[Browsable (false)]
public override string Value {