Jun 05, 2013, 2:48 PM
Empty NumberField returns minimal value
Hello
I wanted to use for a non mandatory field a number field, the problem is, when the number field is empty, what is allowed, it returns the minimal value instead of the an empty value/string, I'm doing something wrong or this is from design?
I wanted to use for a non mandatory field a number field, the problem is, when the number field is empty, what is allowed, it returns the minimal value instead of the an empty value/string, I'm doing something wrong or this is from design?
<%@ Page Language="C#" AutoEventWireup="true" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
public void Click(object sender,EventArgs e)
{
Label1.Text=NumberField1.Text;
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<ext:NumberField ID="NumberField1" runat="server" AllowBlank="true" MinValue="10" MaxValue="20" />
<ext:Label ID="Label1" runat="server" />
<ext:Button ID="Button1" runat="server" Text="Submit">
<DirectEvents>
<Click OnEvent="Click" />
</DirectEvents>
</ext:Button>
</div>
</form>
</body>
</html>