【发布时间】:2013-05-13 14:39:37
【问题描述】:
当 Server.Execute() myusercontrol 包含 asp(不是 html)的控件时,我收到以下消息
用户控制:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MyWebUserControl1.ascx.cs" Inherits="ImageHandlerClient.WebUserControl1" %>
堆栈跟踪:
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride)
【问题讨论】:
-
您的问题是什么?您是否检查了异常消息(通过单击弹出窗口中“操作”下的“查看详细信息...”)?
-
执行子请求时出错意味着 ascx 内部有问题,...
-
当执行 ascx 文件时,所有内容都是 HTML 工作正常,但是当添加 asp 控制按钮时不起作用
-
使用@Igor 方法获取内部异常,并将堆栈跟踪的内容添加到您的帖子中。在找出内部异常是什么之前,我们无法解决这个问题。
-
我编辑问题并添加堆栈跟踪