内容页面中仅允许直接使用内容控件 [英] Only Content controls are allowed directly in a content page
本文介绍了内容页面中仅允许直接使用内容控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我创建了一个新的samlpe.asp页
Hi,
I created one new samlpe.asp page
<%@Page Title="" Language="C#" ......%>
<asp:Content ID="content1" ContentPlaceHolderID="HeadContent" Runat="Server></asp:Content>
<asp:Content ID="content1" ContentPlaceHolderID="MainContent" Runat="Server></asp:Content>
在此页面中,我要使用带有分隔符的 Html Form标签
例如:
In this page I want to use Html Form tag with Splitter
Ex:
<html>
<head id=id1" reunat="server">
<style type="text/css">
----
----
</style>
</head>
<body>
<obspl:splitter ---> </obspl:splitter>
</body></html>
错误:仅在包含内容控件的内容页面中直接允许内容控件
请告诉我如何在"sample.asp"页面中使用html标记
谢谢.
Error:Only Content controls are allowed directly in a content page that contains content controls
Please tell me how to use html tag in "sample.asp" page
Thanks.
推荐答案
看来您正在使用母版页.
您应该将所有控件包装在ContentPlaceHolder中.里面没有html标记,它们应该在母版页中.
否则,请勿使用任何ContentPlaceHolder或母版.
看看以下内容:多个ContentPlaceHolders和默认内容( C#) [ ^ ]
希望对您有所帮助.
Hi,
It seems you''re using a master page.
You should wrap all your controls inside your ContentPlaceHolder. No html tags inside, they should be in the master page.
Otherwise don''t use any ContentPlaceHolder neither a masterpage.
Have a look at this: Multiple ContentPlaceHolders and Default Content (C#)[^]
Hope it helps.
这篇关于内容页面中仅允许直接使用内容控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文