tagMapping doesn't work with HtmlForm

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top