B
Bruno
Hello guys,
I'm having problem using tagMapping with HtmlForm, I have this in
web.config:
<tagMapping>
<add tagType="System.Web.UI.HtmlControls.HtmlForm"
mappedTagType="CustomForm" />
</tagMapping>
It just doesn't work... it compiles ok, but the HtmlForm is not mapped to
CustomForm, it works very well with other controls, but doesn't work with
HtmlForm.
If I go to the page, and add this:
<%@ Register Assembly="System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" Namespace="System.Web.UI.HtmlControls"
TagPrefix="SW" %>
And change the <form> tag to:
<SW:HtmlForm id="form1" runat="server">
</SW:HtmlForm>
Then the tagMapping works!!
The problem with doing this is that the designer shows an error:
form1:Unable to cast object of type
'System.Web.UI.Design.HtmlIntrinsicControlDesigner' to type
'System.Web.UI.Design.ControlDesigner'.
and the source mode shows:
Element 'HtmlForm' is not a known element. This can occur if there is a
compilation error in the Web site.
I'm creating a custom form and it needs to have an easy implementation to
the team, without the need to go and change every page in the system.
I took a look at the temp .vb files generated and it really instantiate the
form object as HtmlForm.
Anyone knows how to solve this?
Thanks in advance!
Bruno
I'm having problem using tagMapping with HtmlForm, I have this in
web.config:
<tagMapping>
<add tagType="System.Web.UI.HtmlControls.HtmlForm"
mappedTagType="CustomForm" />
</tagMapping>
It just doesn't work... it compiles ok, but the HtmlForm is not mapped to
CustomForm, it works very well with other controls, but doesn't work with
HtmlForm.
If I go to the page, and add this:
<%@ Register Assembly="System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" Namespace="System.Web.UI.HtmlControls"
TagPrefix="SW" %>
And change the <form> tag to:
<SW:HtmlForm id="form1" runat="server">
</SW:HtmlForm>
Then the tagMapping works!!
The problem with doing this is that the designer shows an error:
form1:Unable to cast object of type
'System.Web.UI.Design.HtmlIntrinsicControlDesigner' to type
'System.Web.UI.Design.ControlDesigner'.
and the source mode shows:
Element 'HtmlForm' is not a known element. This can occur if there is a
compilation error in the Web site.
I'm creating a custom form and it needs to have an easy implementation to
the team, without the need to go and change every page in the system.
I took a look at the temp .vb files generated and it really instantiate the
form object as HtmlForm.
Anyone knows how to solve this?
Thanks in advance!
Bruno