2.0: BEGINNER'S QUESTION: closing page

  • Thread starter Thread starter R.A.M.
  • Start date Start date
R

R.A.M.

Hello,
I am learning .NET and I need to close current .aspx page browser
window (which I open by window.open from main .aspx page).
I tried this.Unload() but it's not correct, so could you tell me
please how to close current page from its member function?
Thank you very much!
/RAM/
 
I am learning .NET and I need to close current .aspx page browser
window (which I open by window.open from main .aspx page).

You need to close it with Javascript. .NET cannot control the browser on
the client side.
 
You can close browser window only with a javascript call window.close().

On server side you can emit this call in your response stream:
Response.Write("<script>window.close();</script>");

Eliyahu
 
You need to close it with Javascript. .NET cannot control the browser on
the client side.

Could you tell me plase how can I dot it when calendar is clicked?
Thanks
/RAM/
 
Could you tell me plase how can I dot it when calendar is clicked?
Thanks


Was the calendar a popup? Or was it in line with the rest of the page?

Either way - the calendar was closed via Javascript : )
 
I solved the problem. I added in Page_Load of calendar page attribute
"ondblclick" with "window.close();" to calendar object.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top