From: mvr on
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


From: Patrice on
> 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..

--
Patrice

From: Andrew Morton on
mvr wrote:
> 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.

--
Andrew