开发者

response.end() send error

开发者 https://www.devze.com 2023-02-16 08:46 出处:网络
Script $.ajax({ type: \"post\", url: \"Index.aspx?cmd=SettingCreateMember\", success: parseXml }); Code in MasterPage_pagrLoad()

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

精彩评论

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