Hi Florencio,
Add the following to your code-behind to render javascript code to the page before it is sent to the client:
StringBuilder sb = new StringBuilder();
sb.Append("<SCRIPT LANGUAGE = \"JavaScript\">");
sb.Append("self.close();");
sb.Append("</SCRIPT>");
if (!Page.IsStartupScriptRegistered("closewindow"))
{
Page.RegisterStartupScript("closewindow",
sb.ToString());
}
>To all,
>
>Is there a Close method that I can use in order to close the current window
>just after the Page Load Event in the Code Behind Page in ASP.Net
>
>Florencio
-----------------------------------------
Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.comwww.prenia.comWeblog: blogs.prenia.com/cathi