问题描述
“/WebSite3”应用程序中的服务器错误。应用于ContentPlaceHolder1的多个内容。说明:执行当前Web请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。异常详细信息:System.Web.HttpException:应用于ContentPlaceHolder1的多个内容。源错误:行1:<%@PageTitle=""Language="C#"MasterPageFile="~/MasterPage.master"AutoEventWireup="true"CodeFile="Default.aspx.cs"Inherits="_Default"%>行2:行3:<asp:ContentID="Content1"ContentPlaceHolderID="ContentPlaceHolder1"Runat="Server">行4:</asp:Content>行5:<asp:ContentID="Content2"ContentPlaceHolderID="ContentPlaceHolder2"Runat="Server">源文件:d:DocumentsVisualStudio2010WebSitesWebSite3Default.aspx行:3堆栈跟踪:[HttpException(0x80004005):应用于ContentPlaceHolder1的多个内容。]System.Web.UI.Page.AddContentTemplate(StringtemplateName,ITemplatetemplate)+203ASP.default_aspx.__BuildControlTree(default_aspx__ctrl)ind:DocumentsVisualStudio2010WebSitesWebSite3Default.aspx:3ASP.default_aspx.FrameworkInitialize()ind:DocumentsVisualStudio2010WebSitesWebSite3Default.aspx.cs:912307System.Web.UI.Page.ProcessRequest(BooleanincludeStagesBeforeAsyncPoint,BooleanincludeStagesAfterAsyncPoint)+48System.Web.UI.Page.ProcessRequest()+72System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContextcontext)+21System.Web.UI.Page.ProcessRequest(HttpContextcontext)+58ASP.default_aspx.ProcessRequest(HttpContextcontext)inc:WindowsMicrosoft.NETFrameworkv4.0.30319TemporaryASP.NETFileswebsite360464085f7d42298App_Web_zw4bwcrm.0.cs:0System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()+341System.Web.HttpApplication.ExecuteStep(IExecutionStepstep,Boolean&completedSynchronously)+69
解决方案
解决方案二:
ID重复了吧
解决方案三:
你需要在引用了ContentPlaceHolder1里面自由添加内容写html或者其他东西<asp:ContentID="Content1"ContentPlaceHolderID="ContentPlaceHolder1"Runat="Server">helloworld!</asp:Content>