[Mono-bugs] [Bug 53898][Blo] Changed - System.ComponentModel.AttributeCollection:GetDefaultAttribute throws MissingMethodException
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Wed, 4 Feb 2004 20:04:29 -0500 (EST)
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 jonwagner@hotmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=53898
--- shadow/53898 2004-02-04 18:22:13.000000000 -0500
+++ shadow/53898.tmp.20133 2004-02-04 20:04:29.000000000 -0500
@@ -91,6 +91,29 @@
} else {
attr = (Attribute) def.GetValue (null);
}
return attr;
}
+
+------- Additional Comments From jonwagner@hotmail.com 2004-02-04 20:04 -------
+Steps to Reproduce:
+
+1. Create a custom text box control class. class MyTextBox : TextBox
+{ }
+2. Put MyTextBox on a page with an asp:requiredvalidator tag.
+
+This causes two errors:
+a) System.ComponentModel.AttributeCollection:GetDefaultAttribute
+throws MissingMethodException (I'll add a proposed patch soon.)
+b) With patch, you get the following exception
+
+System.Web.HttpException: Validator_bad_control_type: UserName
+ControlToValidatein <0x000c9>
+System.Web.UI.WebControls.BaseValidator:CheckControlValidationProperty
+ (string,string)
+
+Suspected cause:
+It appears that ValidationPropertyAttribute is not being properly
+inherited into the custom textbox class. This is probably caused by
+the fact that AttributeUsageAttribute.Inherited does not default to
+true and some other cause I haven't tracked down yet.