Hi Daniil
I try follow the example in the thread you sent me, but I´m not working.
I am having two problems:
1 - In <DirectMethod> (follow), I get the message 'Redirect is not a member of 'Ext.net.BuilderFactory''.
<DirectMethod()>
Public Sub Redirect(url As String)
X.Redirect(url)
End Sub
2 - The method Redirect is not being called.
2.1 - I replace X.Redirect(url) to Response.Redirect(url) in Redirect function on default.aspx and set a breakpoint in this code line.
2.2 - In testHeader.aspx, code behind event LoginStatus1_LoggingOut, I insert the code bellow, and set a breakpoint to.
<script runat="server">
Protected Sub LoginStatus1_LoggingOut(sender As Object, e As System.Web.UI.WebControls.LoginCancelEventArgs) Handles LoginStatus1.LoggingOut
'Server.TransferRequest("")
'Response.Redirect("~/app/logins/loginout.aspx", True)
'ClientScript.RegisterStartupScript(Me.GetType(), "scriptid", "window.parent.location.href='/app/logins/loginout.aspx'", True)
'Server.TransferRequest("~/app/logins/loginout.aspx")
Ext.Net.X.Js.Call("parent.Ext.net.DirectMethods.Redirect", "loginout.aspx")
End Sub
</script>
The event LoginStatus1_LogginOut is fired of testheader.aspx is fired, but the function Redirect in default.aspx page is not fired.
Follow the page code
Default.aspx
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="default.aspx.vb" Inherits="WebApplication2.Default1" %>
<%@ 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">
<DirectMethod()>
Public Sub Redirect(url As String)
'X.Redirect(url)
Response.Redirect(url)
End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'autenticado
'FormsAuthentication.RedirectFromLoginPage("teste", True)
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
</head>
<body>
<ext:ResourceManager ID="resManagerSuperaWebLogins" runat="server" Namespace="SuperaWeb" />
<ext:Viewport ID="Viewport1" runat="server">
<LayoutConfig>
<ext:VBoxLayoutConfig Align="Stretch" />
</LayoutConfig>
<Items>
<ext:Panel ID="tabHeader" runat="server" Region="North" Border="false" Height="60px">
<Loader ID="Loader1" runat="server" Mode="Frame" AutoLoad="true" Url="testheader.aspx" >
<LoadMask ShowMask="true"/>
</Loader>
</ext:Panel>
<ext:Panel runat="server" Border="true" Title="Main content" Flex="1" />
</Items>
</ext:Viewport>
</body>
</html>
testheader.aspx
<%@ Page Language="vb" %>
<%@ 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">
Protected Sub LoginStatus1_LoggingOut(sender As Object, e As System.Web.UI.WebControls.LoginCancelEventArgs) Handles LoginStatus1.LoggingOut
'Server.TransferRequest("")
'Response.Redirect("~/app/logins/loginout.aspx", True)
'ClientScript.RegisterStartupScript(Me.GetType(), "scriptid", "window.parent.location.href='/app/logins/loginout.aspx'", True)
'Server.TransferRequest("~/app/logins/loginout.aspx")
Ext.Net.X.Js.Call("parent.Ext.net.DirectMethods.Redirect", "loginout.aspx")
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
</head>
<body style="padding: 0px 0px 0px 0px; margin:0px 0px 0px 0px;">
<ext:ResourceManager ID="ResourceManager1" runat="server" Locale="pt-BR" Namespace="SuperaWeb" />
<form id="SuperaWebHeader" runat="server">
<div id="header" style="padding: 0px 0px 0px 0px; margin:0px 0px 0px 0px;"><h1><font style='color: #15428B;'>
<asp:Label runat="server" ID="lblTitle" Text="SuperaWEB" Width="600" style="position:fixed; top:5px; left:80px;"/></font></h1>
<asp:Label runat="server" ID="lblUsuario" style="position:fixed; top:23px; right:70px;"/>
<asp:LoginStatus ID="LoginStatus1" runat="server" style="position:fixed; top:23px; right:30px;" />
<asp:Label runat="server" ID="lblEmpresa" style="position:fixed; top:42px; right:30px; color:White;"/>
</div>
</form>
</body>
</html
LoginOut.aspx<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="loginout.aspx.vb" Inherits="WebApplication2.loginout" %>
<%@ 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">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<ext:ResourceManager ID="ResourceManager1" runat="server" Locale="pt-BR" Namespace="SuperaWeb" />
<form id="form1" runat="server">
<div>
<ext:Window ID="wndLoginOut"
runat="server"
Title="SUPERAWEB logout!"
Width="440"
Height="220"
BodyPadding="10"
Resizable="false"
Closable="false"
Layout="FitLayout"
icon="Information">
<Items>
<ext:Panel runat="server" ID="paneLoginOut" Layout="ColumnLayout" BodyPadding="10" BodyStyle="background-color:transparent" Icon="Cancel">
<Items>
<ext:Container runat="server" ColumnWidth=".3" >
<Items>
<ext:Image runat="server" ID="imgError" Height="70" Width="70" ImageUrl="~/resources/images/icons/logout.png"/>
</Items>
</ext:Container>
<ext:Label runat="server" ID="txtDescription" ColumnWidth=".7" html="<b><n>Você está se deslogando da SuperaWeb...</n></b>"/>
</Items>
</ext:Panel>
</Items>
</ext:Window>
</div>
</form>
</body>
</html>