如何解决这个问题“页面只能有一个服务器端表单标签。” ? [英] How do is solve this problem "a page can have only one server-side form tag." ?

查看:74
本文介绍了如何解决这个问题“页面只能有一个服务器端表单标签。” ?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前没有母版页,但却面临这个问题一个页面只能有一个服务器端的Form标签。好像有正在使用的母版页。





任何帮助?



我尝试了什么:



没什么,因为在Master页面和其他页面相关的Form标签两次定义时,通常会出现此问题但在这种情况下,我根本没有使用Master页面,只有两页default.aspx(作为登录页面)和Homepage.aspx。

I have no Master page currently and yet facing this problem "A page can have only one server-side Form tag." as if there is Master page in use.


Any help?

What I have tried:

Nothing because this problem usually comes when Form tag is twice defined in both Master page and other page related but in this case, i have used no Master page at all, just two pages default.aspx( as login page) and Homepage.aspx.

推荐答案

该错误不是与母版页有关,当你在同一页面上有两个带有runat = server的表单标签时,你必须拥有它。解决方案是重新构建您的页面,这样您只需要一个表单,或者您仍然可以拥有多个表单标签,但只有一个可以具有runat = server,并且它们不能嵌套。
That error isn't related to master pages, it's when you have two form tags with runat=server on the same page, so you must have that somewhere. The solution is to re-architect your page such that you only need one form, or you can still have multiple form tags, but only one can have runat=server, and they can't be nested.


这篇关于如何解决这个问题“页面只能有一个服务器端表单标签。” ?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆