Nov 24, 2014, 9:03 AM
Validation not working when asp control added
Hi,
We need to include an asp control in a panel which also includes validation but when we add the asp control ext.net validation no longer works. Here is an example, when I enter a value in TextField1 field, Button1 stays disabled:
Thanks for your help,
Swanny.
We need to include an asp control in a panel which also includes validation but when we add the asp control ext.net validation no longer works. Here is an example, when I enter a value in TextField1 field, Button1 stays disabled:
<%@ Page Language="C#" %>
<%@ Import Namespace="Ext.Net.Utilities" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html>
<html>
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" DisableViewState="false" runat="server" />
<ext:Panel ID="Panel2" runat="server" Title="Editor" Height="200" Width="500">
<Content>
<ext:FormPanel ID="FormPanel2" runat="server" Frame="true" MonitorValid="true" Height="150" Width="500">
<Content>
<ext:Container ID="Container1" runat="server" Title="Information">
<Content>
<ext:TextField ID="TextField1" runat="server" Width="200" FieldLabel="First Name" AllowBlank="false" />
<asp:FileUpload ID="fileupload1" runat="server" />
</Content>
</ext:Container>
</Content>
<Buttons>
<ext:Button ID="Button1" runat="server" Text="Save" Disabled="true">
</ext:Button>
<ext:Button ID="Button2" runat="server" Text="Close">
</ext:Button>
</Buttons>
<Listeners>
<ValidityChange Handler="#{Button1}.setDisabled(!valid);" />
</Listeners>
</ext:FormPanel>
</Content>
</ext:Panel>
</form>
</body>
</html>
How do I modify the code so Button1 is enabled when I enter a value into TextField1?Thanks for your help,
Swanny.