Originally Posted by
Daniil
Hi,
Please provide a sample to reproduce.
<%@ Page Language="C#" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<style type="text/css">
</style>
<script src="../../Scripts/jquery-1.6.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
if (window.top.frames.length !== 0) {
window.top.location = self.document.location;
}
var onLoad = function () {
txtUsername.focus(false, 100);
};
var onSubmit = function () {
if (txtUsername.getValue() == "" && txtPassword.getValue() == "") {
Ext.Msg.show({
title: 'Alert',
msg: 'You should put login and password',
buttons: Ext.Msg.OK,
icon: Ext.MessageBox.INFO
});
}
else {
_accountBtn.fireEvent('click');
}
};
</script>
</head>
<body>
<ext:ResourceManager runat="server">
<Listeners>
<DocumentReady Handler="onLoad();" />
</Listeners>
</ext:ResourceManager>
<h1>
Axe Credit Portal (4.0 Star Project RC)</h1>
<ext:Window ID="LoginWindow" runat="server" Closable="false" Resizable="false" Height="130"
Icon="Lock" Title="Login" Draggable="true" Width="300" Modal="true" Layout="fit"
Padding="5" BodyBorder="0">
<Items>
<ext:FormPanel runat="server" ID="_accountFormPnl" FormID="form1" Border="false"
Layout="form" BodyStyle="background:transparent;" Url='<%# Html.AttributeEncode(Url.Action("Login")) %>'>
<Items>
<ext:TextField ID="txtUsername" runat="server" FieldLabel="Username" AnchorHorizontal="100%" />
<ext:TextField ID="txtPassword" runat="server" InputType="Password" FieldLabel="Password"
AnchorHorizontal="100%" />
</Items>
</ext:FormPanel>
</Items>
<Buttons>
<ext:Button runat="server" ID="_accountBtn" Text="Login" Icon="Accept">
<DirectEvents>
<Click Url="/Account/Login" Timeout="60000" FormID="form1" CleanRequest="true" Method="POST"
Before="Ext.Msg.wait('Verifying...', 'Authentication');" Failure="Ext.Msg.show({
title: 'Login Error',
msg: result.errorMessage,
buttons: Ext.Msg.OK,
icon: Ext.MessageBox.ERROR
});">
<EventMask MinDelay="250" />
<ExtraParams>
<ext:Parameter Name="ReturnUrl" Value="Ext.urlDecode(String(document.location).split('?')[1]).r || '/'"
Mode="Raw" />
</ExtraParams>
</Click>
</DirectEvents>
</ext:Button>
</Buttons>
</ext:Window>
<ext:KeyMap ID="KeyMapPnl" runat="server" Target="#{_accountFormPnl}">
<ext:KeyBinding StopEvent="true">
<Keys>
<ext:Key Code="ENTER" />
</Keys>
<Listeners>
<Event Handler="onSubmit();" />
</Listeners>
</ext:KeyBinding>
</ext:KeyMap>
</body>
</html>