djdidge
asked on
Webform unload event - Easy question for somebody!
I create my event from the event section of the property window...
private void wfTimesheet_Unload(object sender, System.EventArgs e)
{
Response.Write("test test test tset");
}
I put a breakpoint on the Response.Write.... It never gets there..
What am I doing wrong?!
Regards,
DiDGE
private void wfTimesheet_Unload(object sender, System.EventArgs e)
{
Response.Write("test test test tset");
}
I put a breakpoint on the Response.Write.... It never gets there..
What am I doing wrong?!
Regards,
DiDGE
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks, ill give it a go....
Seems odd that the unload event doesnt allow this though..
Seems odd that the unload event doesnt allow this though..
ASKER
Hi,
I'm getting there I think. I understand the concept. But there are a few niggles.
In its preset state the web form wfClearBlankRows.aspx is never touched. (breakpoint tested).
(note that im new to Javascript!)
also..... myIFrame.location is not exposed by the intellisense.
Here is the cropped code so far....................
<HTML>
<HEAD>
<title>Time Keeping</title>
<base target="_self">
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScri pt">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
<!-- <LINK href="styles/evolve.css" type="text/css" rel="stylesheet"> -->
<script>
function beforeClose()
{
myIFrame.location.href = "wfClearBlankRows.aspx";
}
</script>
</HEAD>
<body onbeforeunload="beforeClos e();" MS_POSITIONING="GridLayout ">
<form id="Form1" method="post" runat="server">
<iframe id="myIFrame" style="DISPLAY: none" name="myIFrame" src="" runat="server"></iframe>
I'm getting there I think. I understand the concept. But there are a few niggles.
In its preset state the web form wfClearBlankRows.aspx is never touched. (breakpoint tested).
(note that im new to Javascript!)
also..... myIFrame.location is not exposed by the intellisense.
Here is the cropped code so far....................
<HTML>
<HEAD>
<title>Time Keeping</title>
<base target="_self">
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScri
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
<!-- <LINK href="styles/evolve.css" type="text/css" rel="stylesheet"> -->
<script>
function beforeClose()
{
myIFrame.location.href = "wfClearBlankRows.aspx";
}
</script>
</HEAD>
<body onbeforeunload="beforeClos
<form id="Form1" method="post" runat="server">
<iframe id="myIFrame" style="DISPLAY: none" name="myIFrame" src="" runat="server"></iframe>
ASKER
I couldnt quite get it to work... but the logic is there.
Closed the queston to be tidy....
Thanks - didge
Closed the queston to be tidy....
Thanks - didge
ASKER