[Mono-bugs] [Bug 76837][Nor] New - Upload (File Field) Control doesn't not add the enctype attribute to the form

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Nov 28 12:41:57 EST 2005


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by informatique.internet at fiducial.fr.

http://bugzilla.ximian.com/show_bug.cgi?id=76837

--- shadow/76837	2005-11-28 12:41:57.000000000 -0500
+++ shadow/76837.tmp.30108	2005-11-28 12:41:57.000000000 -0500
@@ -0,0 +1,95 @@
+Bug#: 76837
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Sys.Web
+AssignedTo: gonzalo at ximian.com                            
+ReportedBy: informatique.internet at fiducial.fr               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Upload (File Field) Control doesn't not add the enctype attribute to the form
+
+Description of Problem:
+This is a behaviour difference between mono and MS.NET 1.1. When a File
+Field control is used (and run "at server") MS.NET add a enctype attribute
+: enctype="multipart/form-data to the form. When you use this control with
+mono, it doesn't add anything to the form (you have to add it by yourself)
+
+Steps to reproduce the problem:
+test this page :
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
+
+<HTML>
+
+	<HEAD>
+
+		<title>WebForm1</title>
+
+		<meta name="CODE_LANGUAGE" Content="C#">
+
+	</HEAD>
+
+	<body MS_POSITIONING="GridLayout">
+
+		<form id="Form1" method="post" runat="server">
+
+		<INPUT id="File1" type="file" name="File1" runat="server">
+
+		</form>
+
+	</body>
+
+</HTML> 
+2. Under MS.NET it generates:
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
+<HTML>
+	<HEAD>
+		<title>WebForm1</title>
+		<meta name="CODE_LANGUAGE" Content="C#">
+	</HEAD>
+	<body MS_POSITIONING="GridLayout">
+		<form name="Form1" method="post" action="testupload.aspx" id="Form1"
+enctype="multipart/form-data">
+<input type="hidden" name="__VIEWSTATE"
+value="dDwtODE4Nzk5MjEzO3Q8O2w8aTwxPjs+O2w8dDxwPGw8ZW5jdHlwZTs+O2w8bXVsdGlwYXJ0L2Zvcm0tZGF0YTs+Pjs7Pjs+Pjs+F7gerCR6+H5mvXmWm7Qs+b/9BzY="
+/>
+
+		<input name="File1" id="File1" type="file" />
+		</form>
+	</body>
+</HTML>
+
+3. on mono it generates :
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
+<HTML>
+	<HEAD>
+		<title>WebForm1</title>
+		<meta name="CODE_LANGUAGE" Content="C#">
+	</HEAD>
+	<body MS_POSITIONING="GridLayout">
+		<form name="Form1" method="post" action="testupload.aspx" id="Form1">
+<input type="hidden" name="__VIEWSTATE" value="DAAOAQEFRmlsZTE=" />
+
+		<input name="File1" id="File1" type="file" />
+		</form>
+	</body>
+</HTML>
+
+
+Actual Results:
+no "enctype" attribute is added to the form
+
+Expected Results:
+enctype="multipart/form-data" should be added to the form
+
+How often does this happen? 
+everytime
+
+Additional Information:


More information about the mono-bugs mailing list