[Mono-bugs] [Bug 80442][Cri] New - Simple PostBack doesn't work

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Jan 3 11:40:04 EST 2007


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=80442

--- shadow/80442	2007-01-03 11:40:04.000000000 -0500
+++ shadow/80442.tmp.31007	2007-01-03 11:40:04.000000000 -0500
@@ -0,0 +1,152 @@
+Bug#: 80442
+Product: Mono: Class Libraries
+Version: 1.2
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Critical
+Component: Sys.Web
+AssignedTo: gonzalo at ximian.com                            
+ReportedBy: informatique.internet at fiducial.fr               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Simple PostBack doesn't work
+
+Description of Problem:
+This apply on mono svn r.70423.
+
+this is a recent regression
+
+Steps to reproduce the problem:
+1. try this aspx
+
+ <%@ Page Language="C#" Inherits="TestExecute.Default" %>
+<html>
+<head>
+	<title>index2</title>
+</head>
+<body>
+	<form id="form1" runat="server" enctype="multipart/form-data">
+	</form>
+</body>
+</html>
+
+
++ index.asxp.cs
+
+using System;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.HtmlControls;
+
+namespace TestExecute
+{
+
+    public class Default : Page
+    {
+		protected System.Web.UI.HtmlControls.HtmlForm form1;
+		protected System.Web.UI.WebControls.LinkButton button1;
+    	protected HtmlInputFile inputfile;
+    	
+    	protected override void OnInit(System.EventArgs e)
+    	{
+
+    		
+    	}
+    	
+    	
+        protected override void OnLoad(System.EventArgs e)
+        {
+        	button1=new LinkButton();
+        	button1.Text="Submit";
+        	button1.Click+=OnClick;
+        	form1.Controls.Add(button1);
+        }
+        
+        protected  void OnClick(object o,System.EventArgs e)
+        {
+        	Console.WriteLine("click");
+
+        }
+    }
+}
+
+2. 
+3. 
+
+Actual Results:
+
+Html Generated :
+
+<html>
+<head>
+	<title>index2</title>
+</head>
+<body>
+	<form name="form1" method="post" action="index.aspx"
+enctype="multipart/form-data" id="form1">
+<input type="hidden" name="__VIEWSTATE" value="DAAA" />
+
+	<a href="javascript:__doPostBack('_ctl0','')">Submit</a><input
+type="hidden" name="__EVENTTARGET" value="" />
+<input type="hidden" name="__EVENTARGUMENT" value="" />
+
+<script language="javascript">
+<!--
+	var theForm;
+	if (document.getElementById) { theForm = document.getElementById ('form1'); }
+	else { theForm = document.form1; }
+	function __doPostBack(eventTarget, eventArgument) {
+		if(!ValidatorOnSubmit()) return;
+		theForm.__EVENTTARGET.value = eventTarget;
+		theForm.__EVENTARGUMENT.value = eventArgument;
+		theForm.submit();
+	}
+// -->
+
+</script>
+</form>
+</body>
+</html>
+
+Expected Results:
+
+<html>
+<head>
+	<title>index2</title>
+</head>
+<body>
+	<form name="form1" method="post" action="index.aspx"
+enctype="multipart/form-data" id="form1">
+<input type="hidden" name="__VIEWSTATE" value="DAAA" />
+
+	<a href="javascript:__doPostBack('_ctl0','')">Submit</a><input
+type="hidden" name="__EVENTTARGET" value="" />
+<input type="hidden" name="__EVENTARGUMENT" value="" />
+<script language="javascript">
+<!--
+	var theForm;
+	if (document.getElementById) { theForm = document.getElementById ('Form1'); }
+	else { theForm = document.Form1; }
+	function __doPostBack(eventTarget, eventArgument) {
+		theForm.__EVENTTARGET.value = eventTarget;
+		theForm.__EVENTARGUMENT.value = eventArgument;
+		theForm.submit();
+	}
+// -->
+</script>
+
+</form>
+</body>
+</html>
+
+How often does this happen? 
+
+Always
+
+Additional Information:


More information about the mono-bugs mailing list