[Mono-bugs] [Bug 81089][Nor] New - Login command name + casing [w/ fix]

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Mar 8 23:05: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 mmorano at mikeandwan.us.

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

--- shadow/81089	2007-03-08 23:05:04.000000000 -0500
+++ shadow/81089.tmp.7968	2007-03-08 23:05:04.000000000 -0500
@@ -0,0 +1,58 @@
+Bug#: 81089
+Product: Mono: Class Libraries
+Version: 1.2
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Sys.Web
+AssignedTo: mhabersack at novell.com                            
+ReportedBy: mmorano at mikeandwan.us               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Login command name + casing [w/ fix]
+
+Porting a working site from MS to mono.  I have a Login control that makes
+use of the LayoutTemplate.  Inside the template, I have declared the button
+as follows:
+
+<asp:Button id="loginButton" CommandName="login" Text="Login"
+CssClass="submit" runat="server" />
+
+This works on MS, however does not work on mono.  The reason this does not
+currently work on mono is that it does a case sensitive comparison of the
+command name, which it expects to be "Login", however as the above example
+illustrates, it will not match due to casing.
+
+The simple fix is to perform a case insensitive comparison in the
+Login.OnBubbleEvent method, as the following diff illustrates
+(System.Web.UI.WebControls.Login):
+
+
+Index: Login.cs
+===================================================================
+--- Login.cs    (revision 73938)
++++ Login.cs    (working copy)
+@@ -1095,7 +1095,8 @@
+                {
+                        // check for submit button
+                        CommandEventArgs cea = (e as CommandEventArgs);
+-                       if ((cea != null) && (cea.CommandName ==
+LoginButtonCommandName)) {
++
++                       if ((cea != null) &&
+(string.Equals(cea.CommandName, LoginButtonCommandName,
+StringComparison.InvariantCultureIgnoreCase))) {
+                                if (!AuthenticateUser ()) {
+                                        ITextControl failureText =
+LoginTemplateContainer.FailureTextLiteral;
+                                        if (failureText != null)
+
+
+
+Thanks,
+Mike


More information about the mono-bugs mailing list