码迷,mamicode.com
首页 > 其他好文 > 详细

Response.End方法

时间:2018-11-12 17:43:10      阅读:744      评论:0      收藏:0      [点我收藏+]

标签:link   http   mic   post   tps   执行   pre   ons   ati   

 

文章:在try...catch语句中执行Response.End()后如何停止执行catch语句中的内容

调用Response.End()方法能保证,只输出End方法之前的内容。

调用Context.ApplicationInstance.CompleteRequest();方法,会输出方法之后的Response.Write()内容,并且页面的html内容一会被输出。
除非你删除掉页面的html,只保留:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ResponseEnd.aspx.cs" Inherits="TestWebBackThread.ResponseEnd" %>

 


Context.ApplicationInstance.CompleteRequest()

使 ASP.NET 跳过 HTTP 执行管线链中的所有事件和筛选并直接执行 EndRequest 事件。

Response.End方法

标签:link   http   mic   post   tps   执行   pre   ons   ati   

原文地址:https://www.cnblogs.com/Tpf386/p/9946885.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!