主页上需要使用runat = server的多个表单标签? [英] Multiple form tags with runat=server required on master page ?

查看:74
本文介绍了主页上需要使用runat = server的多个表单标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hii,



我的方案就像我在页面顶部有登录视图控件,需要使用runat = server标签的形式tage,



i还需要为内容占位符形成带有runat = server标签的标签,以便它适用于所有子页面,



在这之间有几个搜索框需要表单标签,但这些没有runat =服务器属性/



很明显我不能使用嵌套标签来放置身体后。 .which不受支持。



如果我删除所有的小表格并放一张我所有的表格设计变得凌乱..请给我一些建议

Hii ,

My scenario is like i have login view control on my top of the page which requires form tage with runat=server tag ,

i also need to form tag with runat=server tag for content place holder so that it will be for all child pages ,

Between this there are few search boxes which requires form tags but these are without runat=server attributes/

obviously i cannot use nested for tag by putting after body ..which is not supported .

if i remove all the small form tages and put one single all my design of the form gets messy ..please suggest me something on this

推荐答案

ASP.NET不支持多个表单标记 runat =server - http://msdn.microsoft.com/en-us/magazine/cc163736.aspx#S4 [ ^ ] ...

但是,因为HTML确实支持多个表单标签,所以你也可以使用它们ASP.NET,但只有其中一个可以有 runat =server,并且只有其中一个将链接到服务器上的Page对象...

(即使HTML支持多个表单标签,也不建议在没有充分理由的情况下这样做 - 在这样的页面上你很容易迷失...)
ASP.NET does not support multiple form tags with runat="server" - http://msdn.microsoft.com/en-us/magazine/cc163736.aspx#S4[^]...
But, because HTML does support multiple form tags you can have them also in ASP.NET, but only one of them can have runat="server" and for that only one of them will be linked to your Page object on the server...
(Even HTML does support multiple form tags it is not recommended to do so without very good reason - you will get lost very easily on such page...)


这篇关于主页上需要使用runat = server的多个表单标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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