[Mono-bugs] [Bug 76781][Wis] New - Mono 1.1.10 htmlInputButton
control problem
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Mon Nov 21 07:59:50 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 chief.hsu at gmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=76781
--- shadow/76781 2005-11-21 07:59:50.000000000 -0500
+++ shadow/76781.tmp.20420 2005-11-21 07:59:50.000000000 -0500
@@ -0,0 +1,117 @@
+Bug#: 76781
+Product: Mono: Class Libraries
+Version: 1.1
+OS: GNU/Linux [Other]
+OS Details: Fedora Core 4
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: Sys.Web
+AssignedTo: gonzalo at ximian.com
+ReportedBy: chief.hsu at gmail.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Mono 1.1.10 htmlInputButton control problem
+
+Please fill in this template when reporting a bug, unless you know what
+you are doing.
+Description of Problem:
+
+In Mono 1.1.10, a htmlInputButton control is rendered like:
+
+<input language="javascript" onclick=" __doPostBack
+('buttonName','')" ....>
+
+even no ASP.NET validator controls are used in the page.
+
+In Mono 1.1.8.3, there is no such problem.
+
+This causes a lot of troubles. For example, if I use a client-side
+javascript to verify users' input and when the script returns a false
+value, the form is still submitted. The worst thing is if the script
+returns a true value, the form is submitted twice!
+
+Here is my sample codes:
+
+<!- testBtn.aspx file ->
+<%@ Page language="c#" Codebehind="testBtn.aspx.cs"
+AutoEventWireup="false" Inherits="myAspNet.testBtn" %>
+<HTML>
+<HEAD>
+<script language="javascript">
+function doCheck(){
+ if(Form1.firstName.value==""){
+ alert("Please enter your first name.");
+ return false;
+ }
+}
+</script>
+<title>testBtn</title>
+</HEAD>
+<body>
+<form id="Form1" method="post" runat="server">
+First Name:<input type="text" id="firstName" name="firstName"
+runat="server"><br>
+<input type="submit" id="btnShow" name="btnShow" value="Show Name"
+runat="server"><br>
+<asp:Label id=Label1 runat="server" />
+</form>
+</body>
+</HTML>
+
+
+
+//testBtn.aspx.cs file ----
+namespace myAspNet
+{
+ public class testBtn : System.Web.UI.Page
+ {
+ protected System.Web.UI.HtmlControls.HtmlForm Form1;
+ protected System.Web.UI.HtmlControls.HtmlInputText firstName;
+ protected System.Web.UI.HtmlControls.HtmlInputButton btnShow;
+ protected System.Web.UI.WebControls.Label Label1;
+
+ private void Page_Load(object sender, System.EventArgs e)
+ {
+ Form1.Attributes.Add("onsubmit","return doCheck()");
+ }
+
+ override protected void OnInit(EventArgs e)
+ {
+ InitializeComponent();
+ base.OnInit(e);
+ }
+
+ private void InitializeComponent()
+ {
+ this.btnShow.ServerClick += new System.EventHandler
+(this.btnShow_ServerClick);
+ this.Load += new System.EventHandler(this.Page_Load);
+ }
+
+ private void btnShow_ServerClick(object sender, System.EventArgs e)
+ {
+ Label1.Text = "Your first name is: " + firstName.Value + "<br>";
+ }
+
+ }
+}
+
+Steps to reproduce the problem:
+1.
+2.
+3.
+
+Actual Results:
+
+
+Expected Results:
+
+
+How often does this happen?
+Always.
+
+Additional Information:
More information about the mono-bugs
mailing list