2.0: BEGINNER'S QUESTION: closing page

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/
 
G

Guest

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.
 
E

Eliyahu Goldin

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
 
R

R.A.M.

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/
 
G

Guest

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 : )
 
R

R.A.M.

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

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top