开发者

response.end() send error

Script

$.ajax({
type: "post",
url: "Index.aspx?cmd=SettingCreateMember",
success: parseXml
});

Code in MasterPage_pagrLoad()

if (Req开发者_Go百科uest["cmd"] == "SettingCreateMember")
        {
            var doc = XDocument.Load(Server.MapPath(".") + "\\Administrator\\Questions.config");
            Response.Write(doc);
            Response.End();  //this line error:Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack
}

inline response.end() error say:Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack why?


Response.End uses a ThreadAbortException to end execution of the page and flush the buffer to the client (MSDN). Response.Flush() will not generate a ThreadAbortException.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜