473,387 Members | 1,687 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

2.0: BEGINNER'S QUESTION: closing page

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/
May 23 '06 #1
3 1093
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.A.M." <r_********@poczta.onet.pl> wrote in message
news:4l********************************@4ax.com...
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/

May 23 '06 #2
>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/
May 25 '06 #3
I solved the problem. I added in Page_Load of calendar page attribute
"ondblclick" with "window.close();" to calendar object.
May 25 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Julia Briggs | last post by:
Hello, trying to create logic tests against a string allowing someone to enter a certain character once or twice into a form consecutively, but not twice seperated between other characters.... ...
16
by: Terry | last post by:
Hi, This is a newbie's question. I want to preload 4 images and only when all 4 images has been loaded into browser's cache, I want to start a slideshow() function. If images are not completed...
2
by: N3TB1N | last post by:
Let me try again. I could use some help with this assignment, even though my teacher does not grade assignments.but because I need to know this stuff for a test very soon, but haven't been in...
7
by: Sharon | last post by:
Hiya I have a small question, I saw this piece of code somewhere (it's for creating a customized context menu) and I was wondering: Why is it that the STYLE and SCRIPT-tags are broken up into...
6
by: sstallman | last post by:
I have been tasked with creating a database in Access for a Mortgage Lending office. My boss wants a database that can be placed on the office server. He wants all of the lending officers to be...
13
by: jcsnippets.atspace.com | last post by:
Hi everybody, A few days ago I decided to get my site validated, so I have begun to clean up the first page to get an impression of what I should and should not do. To be able to get the site...
6
by: jan | last post by:
My apologies for being a javascript beginner and asking such a basic question. This is probably so easy that nobody ever mentions it. Tutorials and places that tell of basic commands never seem to...
3
by: Bryan Heit | last post by:
I have a beginner question. I'm working on a page which is using frames; basically there is the main "window" and a side-bar, each of which is a separate frame. I was wondering if there was some...
5
by: Christian Schlemmer | last post by:
Hi, in a webapplication, after a submit a page is called which is processing images uploaded by the user. currently after submit a status bar will be visible (the page for the image processing...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.