closing browser with out user interaction

M

mvr

Hi all

Per my requirement, I have to send an instant email from an classic
asp application(my limitations are I cannot use the CDONTS). So I created a
asp.net application (using smtpclient)to send email.
When the user clicks "submit" button on classic ASP page, I will
invoke a call to the .Net asp application, which will send the email. So far
is good.
My problem is I want to close the asp.net browser with out user
interation. I am using IE 7. and using the following code to close.
ClientScript.RegisterStartupScript(Me.GetType(), "clientscript",
"self.close();", True)

' Response.Write("<script language = ""JavaScript"">")

' Response.Write("self.close();")

'Response.Write("</script>")

At the time of closing the browser, it is showing a pop up to user asking
do you want to close this page.

Can some one suggest a way to close this alert box with out user
interaction.

Thanks in advance

mvr
 
P

Patrice

At the time of closing the browser, it is showing a pop up to user asking
do you want to close this page.

Can some one suggest a way to close this alert box with out user
interaction.

If you can open this window by code, you'll be able to close it without user
consent. The idea is that code is not allowed to close a window that was
opened by the user..
 
A

Andrew Morton

mvr said:
Per my requirement, I have to send an instant email from an classic
asp application(my limitations are I cannot use the CDONTS).

There are several free email components available for ASP, e.g. I have
previously used AspEmail from Persits (didn't need the pay-for features).
I'm sure Google can suggest others.

Whether or not that'll help with your browser window issue is another
matter, but you could perhaps use an ASP.NET web service called from your
ASP, instead of an .aspx page.
 

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
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top