[Pkg-mono-devel] Errors in ASP.NET

Tomasz Rybak bogomips@post.pl
Thu, 23 Sep 2004 00:43:14 +0200


--=-lqKebEx0+dSIQsdvq0pU
Content-Type: text/plain; charset=ISO-8859-2
Content-Transfer-Encoding: 8bit

W li¶cie z wto, 21-09-2004, godz. 19:53, Tomasz Rybak pisze: 
> web_regularexpressionvalidator.aspx:
> When I don't write anything and press Submit, I get:
> Entered data is valid.
> 
> Strange - it should show invalid. I think it's because of missing 
> NonEmptyValidator.
> 

I filled bug in bugzilla:
http://bugzilla.ximian.com/show_bug.cgi?id=66649
I also attach patch regex.patch.

> web_table2.aspx: It doesn't run on server. Browser gets asp tags:
> 
> <html>
> <head>
> </head>
> <body>
> <form name="_ctrl1a" method="post" action="web_table2.aspx" enctype="" id="_ctrl1a">
> <input type="hidden" name="__VIEWSTATE" value="" />
> 
> <asp:Table>
> <asp:TableRow>
> <asp:TableCell>
> TEST
> </asp:TableCell>
> </asp:TableRow>
> </asp:Table>
> </form>
> </body>
> </html>

I filled bug in bugzilla:
http://bugzilla.ximian.com/show_bug.cgi?id=66648
I also attach patch table.patch.


-- 
Tomasz Rybak <bogomips@post.pl>

--=-lqKebEx0+dSIQsdvq0pU
Content-Disposition: attachment; filename=regex.patch
Content-Type: text/x-patch; name=regex.patch; charset=ISO-8859-2
Content-Transfer-Encoding: 7bit

diff -Naur xsp-1.0.1/test/web_regularexpressionvalidator.aspx xsp-1.0.2/test/web_regularexpressionvalidator.aspx
--- xsp-1.0.1/test/web_regularexpressionvalidator.aspx	2003-09-14 14:04:29.000000000 +0200
+++ xsp-1.0.2/test/web_regularexpressionvalidator.aspx	2004-09-22 23:48:18.000000000 +0200
@@ -11,9 +11,16 @@
 </head>
 
 <body>
+<p>RegularExpressionValidator returns true if input string is empty.
+So we added RequiredFieldValidator to make sure 
+that all field are not empty and valid.
+</p>
 <form runat="server">
 <asp:Label text="Year (1900-2099, 2 or 4 digits):" runat="server"/><br>
 <asp:TextBox id="year" runat="server" columns="4" maxLength="4"/><br>
+<asp:RequiredFieldValidator runat="server"
+     ControlToValidate="year"
+     ErrorMessage="empty!"/>
 <asp:RegularExpressionValidator runat="server"
      ControlToValidate="year"
      ValidationExpression="(19|20)?\d{2}"
@@ -22,6 +29,9 @@
 
 <asp:Label text="US Zip Code (xxxxx or xxxxx-xxxx):" runat="server"/><br>
 <asp:TextBox id="zipcode" runat="server" columns="10" maxLength="10"/><br>
+<asp:RequiredFieldValidator runat="server"
+     ControlToValidate="zipcode"
+     ErrorMessage="empty!"/>
 <asp:RegularExpressionValidator runat="server"
      ControlToValidate="zipcode"
      ValidationExpression="\d{5}(-\d{4})?"
@@ -30,6 +40,9 @@
 
 <asp:Label text="Email address (e.g. someone@somewhere.com):" runat="server"/><br>
 <asp:TextBox id="email" runat="server" columns="40"/><br>
+<asp:RequiredFieldValidator runat="server"
+     ControlToValidate="email"
+     ErrorMessage="empty!"/>
 <asp:RegularExpressionValidator runat="server"
      ControlToValidate="email"
      ValidationExpression="[\w\.\-]+@[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]+)*(\.[a-zA-Z]{2,3}){1,2}"

--=-lqKebEx0+dSIQsdvq0pU
Content-Disposition: attachment; filename=table.patch
Content-Type: text/x-patch; name=table.patch; charset=ISO-8859-2
Content-Transfer-Encoding: 7bit

diff -Naur xsp-1.0.1/test/web_table2.aspx xsp-1.0.2/test/web_table2.aspx
--- xsp-1.0.1/test/web_table2.aspx	2003-02-14 04:42:10.000000000 +0100
+++ xsp-1.0.2/test/web_table2.aspx	2004-09-23 00:06:15.000000000 +0200
@@ -4,7 +4,7 @@
 </head>
 <body>
 <form runat="server">
-<asp:Table>
+<asp:Table runat="server">
 <asp:TableRow>
 <asp:TableCell>
 TEST

--=-lqKebEx0+dSIQsdvq0pU--