ASP.NET Window - Knowledge Base

Back to Knowledge Base list

How to cancel Close Window action in Window?

Q:

How can I cancel Close Window action in Window?

A:

You may use OnClientPreClose client-side handle

<owd:Window .... OnClientPreClose="return handlePreClose()" ...>
</owd:Window>

<script type="text/javascript">
   function handlePreClose()
   {
        return false;
   }
</script>

"Great Products, Great Support....You people are awesome!!!"

John Sargent
Efficient Engineering