覆盖母版页 vb.net 的表单名称
我似乎无法在母版页中设置表单的 ID 或名称。 [它总是“aspnetForm”]
有没有办法覆盖表单的 uniqueID 属性?
我尝试创建一个类并从 htmlform 继承,但是我无法在我的 masterrepage 上注册它,[未知的服务器标记...]
我像这样注册它
<%@ Register TagPrefix="cf" Namespace="Framework.BaseForm" %>
It seems like I can't set the id or name of the form in my masterpage. [it's always "aspnetForm"]
Is there a way to override the uniqueID property of form?
I tried to create a class and inherit from htmlform, but then i can't register it on my mastrepage, [unknown server tag ... ]
im registering it like this
<%@ Register TagPrefix="cf" Namespace="Framework.BaseForm" %>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
找到了这个,应该可以回答你的问题...
http://forums.asp.net/t/1300826.aspx
和
http://forums.asp.net/p/883974/929349.aspx
Found this, which should answer your questions...
http://forums.asp.net/t/1300826.aspx
and
http://forums.asp.net/p/883974/929349.aspx
我实现了这个,它正在
创建一个名为“BaseForm”的类,该类继承自 HtmlForm,
覆盖 UniqueID 属性并返回您想要的名称。
使用 <%@ Register TagPrefix="cf" Namespace="Framework.BaseForm" %> 在您的母版页中注册它
并替换
我的问题是母版页找不到 BaseForm 的代码,我必须将其放在 app_code 中
i implemented this and it's working
create a class called 'BaseForm' that inherits from HtmlForm
override the UniqueID property and return the name that you want.
register this in your masterpage using <%@ Register TagPrefix="cf" Namespace="Framework.BaseForm" %>
and replace the
my problem was that the masterpage couldn't find the code for BaseForm, i had to put it in app_code