I want to create a button that implements an interface I have designed. I have done the same for a label and it worked like a charm. But the button is giving me a headache... here is the code:

VB Code:
  1. mports System.ComponentModel
  2. Imports System.Web.UI
  3. Imports COmpany.Common.Web.Interfaces
  4.  
  5. <ToolboxData("<{0}:LocalizedButton runat=server></{0}:LocalizedButton>")> Public Class LocalizedButton
  6.     Inherits System.Web.UI.WebControls.Button : Implements ILocalizable
  7.  
  8.     Private _textId As Integer
  9.     Private _isLocalized As Boolean
  10.  
  11.  
  12.  
  13.  
  14.  
  15.     <Bindable(False), Category("Behavior"), DefaultValue("")> Public Property IsLocalized() As Boolean Implements ILocalizable.IsLocalized
  16.         Get
  17.             Return _isLocalized
  18.         End Get
  19.         Set(ByVal Value As Boolean)
  20.             _isLocalized = Value
  21.         End Set
  22.     End Property
  23.  
  24.     Public Sub SetText(ByVal text As String) Implements ILocalizable.SetText
  25.         Me.Text = text
  26.     End Sub
  27.  
  28.     <Bindable(False), Category("Behavior"), DefaultValue("")> Public Property TextId() As String Implements ILocalizable.TextId
  29.         Get
  30.             Return Me._textId
  31.         End Get
  32.         Set(ByVal Value As String)
  33.             Me._textId = Value
  34.         End Set
  35.     End Property
  36. End Class

The same thing worked for a label...

Here is the result I get when I do dra/drop to the webform:

VB Code:
  1. <cc2:LocalizedButton id=LocalizedButton1 runat="server"></cc2:LocalizedButton<!--EndFragment-->
  2.     </BODY></HTML></cc2:LocalizedButton><!--TRIDESIGNCOMMENT-,TRIDESIGNCOMMENTEND-TRIDESIGNPRECOMMENT-EndFragment-->

If I remove the bad html code it works beautifully!!!! But it is very annoying to have to do cleanup for every control I add. What is the problem here??

kind regards
Henrik