我有表格标签问题请任何人都可以提供帮助 [英] i have Form Tag Issue pls any one can help
问题描述
我有一个母版页面,其中包含一般页面框架,并且
包含围绕页面大部分内容的表单。里面
表格标签是一个ContentPlaceholder。
我然后创建一个与该MasterPage绑定的ASPX并在其中放一个
一堆表单字段和一个asp:Button。当我尝试运行该页面时,我获得了... b $ b获得...
控制''ctl00_BodyCPH_ctl00''类型''按钮' '必须放在一个表格中
标签与runat = server
所以我在ASPX页面内尝试了一个表格,我有一个不同的
错误...
一个页面只能有一个服务器端的Form标签
I have a master page which contains a general page framework and also
contains a form around most of the content of the page. Inside
that form tag is a ContentPlaceholder.
I then create an ASPX which is tied to that MasterPage and in it a put a
bunch of form fields and an asp:Button. When I try to run the page, I
get...
"Control ''ctl00_BodyCPH_ctl00'' of type ''Button'' must be placed inside a form
tag with runat=server"
So I tried outing a form inside the ASPX page as well and I got a different
error...
"A page can have only one server-side Form tag"
推荐答案
在母版页和aspx页面中验证内容占位符的ID。它应该是类似的。
Verify the ID of your Content Place Holder in master page and aspx page. It should be similar.
这篇关于我有表格标签问题请任何人都可以提供帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!