SQL PHP HTML ASP JavaScript articles and free scripts to download
 

Ending the script execution by ResponseEnd

We can stop ASP script execution any time by using Response.End object. This object does not require buffer to be On. We can also use response.end with any logical requirements. Here is a simple example of response end.

<%@ Language=VBScript %>
<% Option Explicit
Response.Buffer = false %>

<html><head>
<title>(Type a title for your page here)</title>
</head>
<body >

<%

Response.Write("Message No :1 Before Flush <br>")
Response.Write("Message No :2 After Flush <br>")
Response.End
Response.Write("Message No :3 After End, This line will not be executed <br>")

%>

</body>
</html>

You can see the message no 1 and message no 2 only. After this script execution will be stopped and the outputs will be posted to browser so Message No 3 will not reach the browser


Post Comment This is for short comments only. Use the forum for more discussions.
Name
Email( not to be displayed)Privacy Policy
1+2=This is to prevent automatic submission by spammers. Please enter the result of the sum as asked

Join Our Email List
Email:  
For Email Newsletters you can trust
Response Object