Ending an application

  • Thread starter Thread starter Greg Smith
  • Start date Start date
G

Greg Smith

I am working on my first web app. What is the proper way to end the
application and close the aspx page?

Any help is greatly appreciated.
 
Greg,

Web applications operate in a disconnected environment. Therefore, there
is no such thing as ending the application as there is when writing a
Windows application.

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.

--------------------
 
Isn't there a way to close a page?

Jim Cheshire said:
Greg,

Web applications operate in a disconnected environment. Therefore, there
is no such thing as ending the application as there is when writing a
Windows application.

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.

--------------------
From: "Greg Smith" <[email protected]>
Subject: Ending an application
Date: Wed, 19 Nov 2003 07:19:21 -0600
Lines: 6
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <u$ZOh#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: pc110-115.ahc.umn.edu 160.94.110.115
Path:
cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08.
phx.gbl!TK2MSFTNGP11.phx.gbl
Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.framework.aspnet:191213
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

I am working on my first web app. What is the proper way to end the
application and close the aspx page?

Any help is greatly appreciated.
 
You could call HttpResponse.End but this will not close the browser window

From the MSDN page, End does the following...

Sends all currently buffered output to the client, stops execution of
the page,
and raises the Application_EndRequest event.

If you want to actually close the window and bail, you could try writing out
a javascript block to the browser that calls window.close() but even that
probably won't work the way you want. (Unless I misunderstand what you're
asking.)
 
Greg,

You can close a page, but you'll need to do that in client script.

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.

--------------------
From: "Greg Smith" <[email protected]>
References: <u$ZOh#[email protected]>
Subject: Re: Ending an application
Date: Wed, 19 Nov 2003 11:12:25 -0600
Lines: 47
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: pc110-115.ahc.umn.edu 160.94.110.115
Path: cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08
phx.gbl!tk2msftngp13.phx.gbl
Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.framework.aspnet:191296
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

Isn't there a way to close a page?

Jim Cheshire said:
Greg,

Web applications operate in a disconnected environment. Therefore, there
is no such thing as ending the application as there is when writing a
Windows application.

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.

--------------------
From: "Greg Smith" <[email protected]>
Subject: Ending an application
Date: Wed, 19 Nov 2003 07:19:21 -0600
Lines: 6
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <u$ZOh#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: pc110-115.ahc.umn.edu 160.94.110.115
Path:
cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08
 
Back
Top