the codebehind version would stream script out to the browser
one approach is Response.Write("<script>window.close()</script>");
unless the code runs under the HSA, you will get a confirmation dialog.
--
Regards,
Alvin Bruney
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"Nick Harris" <(E-Mail Removed)> wrote in message
news:er$(E-Mail Removed)...
> is this windows forms or asp.net? I think your talking about asp.net, if
> so, what I've done if it's a child page i write out javascript to close
the
> window using the httpcontext. You can't do this in code behind b/c it
> executes on the server.
>
> If i'm wrong and your talking about winforms just use win.close.
>
> Hope this helps.
>
> Nick Harris, MCSD
>
>
> "Lynette" <(E-Mail Removed)> wrote in message
> news:7A600AB2-5809-4768-800E-(E-Mail Removed)...
> > On my page load sub in my code behind I want to run a script and close
the
> window. I have the script running but I can not get the window to close.
> >
> > Can someone tell me how to do this. I have try calling the page unload
> method but I must not know how to do this.
> >
>
>