Is Response.End() considered harmful?

前端 未结 9 773
陌清茗
陌清茗 2020-11-22 01:01

This KB Article says that ASP.NET\'s Response.End() aborts a thread.

Reflector shows that it looks like this:

public void End()
{
            


        
9条回答
  •  北荒
    北荒 (楼主)
    2020-11-22 01:47

    I've only used Response.End() as a testing/debugging mechanism

    
    Response.Write("myVariable: " + myVariable.ToString());
    Response.End();
    
    

    Judging from what you have posted in terms of research, I would say it would be a bad design if it required Response.End

提交回复
热议问题