Jun 29, 2010, 10:30 AM
Catch the OnUnload Ajaxevent
Hi there,
I would like to remove some session parameters when I leave a page, in order to free the sessionstate.
I have tried to do this in the Page_Unload event but it is fired when I go into the page, because is on the server side,
Well I tried to do in a Ajaxevent with javascript like:
Any idea??
Thanx!
I would like to remove some session parameters when I leave a page, in order to free the sessionstate.
I have tried to do this in the Page_Unload event but it is fired when I go into the page, because is on the server side,
Well I tried to do in a Ajaxevent with javascript like:
<html>
<head>
<title>Abre al salir</title>
<script>
function abreventana(){
window.open("http://www.google.es","venta","")
}
</script>
</head>
<body onunload="abreventana()">
...
The problem is that my page is like this:
<%@ Page Language="C#" MasterPageFile="~/Masters/MasterPage.master" AutoEventWireup="true" CodeFile="ModificarPeticionFrm.aspx.cs" Inherits="Conexion_Peticiones_ModificarPeticionFrm" Title="Untitled Page" %>
<%@ Register Src="~/Conexion/Controles/UcModificarPeticion.ascx" TagName="CrearPeticion" TagPrefix="uc" %>
<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<ext:BorderLayout ID="BorderLayout1" runat="server">
<Center>
<ext:Panel ID="Panel1" runat="server">
<Body>
<ext:AnchorLayout ID="AnchorLayout1" runat="server">
<ext:Anchor>
<ext:Panel ID="Panel3" runat="server" AutoScroll="true">
<Body>
<uc:CrearPeticion ID="crearPeticion" runat="server" />
</Body>
</ext:Panel>
</ext:Anchor>
</ext:AnchorLayout>
</Body>
</ext:Panel>
</Center>
</ext:BorderLayout>
</asp:Content>
And I don't have any idea where could I place the event..Any idea??
Thanx!