Yes... both controls are exactly the same minus the namespace being empty on one of them. I click on the DLL to add it and both appear in the customize toolbar dialog. Both version numbers of 0.0.0.0 (retail)
Here is the command line I used:
vbc /t:library /r:System.dll,System.Web.dll ColorAccessor.
vb
and here is the code from the
VB file:
Imports System.ComponentModel
Imports System
Imports System.Web
Imports System.Web.UI
<DefaultProperty("Text"), ToolboxData("<{0}:ColorAccessor runat=server></{0}:ColorAccessor>")> Public Class ColorAccessor
Inherits System.Web.UI.WebControls.WebControl
Dim _text As String
<Bindable(True), Category("Appearance"), DefaultValue("")> Property [Text]() As String
Get
Return _text
End Get
Set(ByVal Value As String)
_text = Value
End Set
End Property
Protected Overrides Sub Render(ByVal output As System.Web.UI.HtmlTextWriter)
output.Write([Text])
End Sub
End Class
Namespace dbControls
Public Class ColorAccessor : Inherits Control
Private _text As String
Private _color As String
Public Property Text() As String
Get
Return _text
End Get
Set(ByVal Value As String)
If Value <> "Good afternoon Ethan" Then
Throw New ArgumentException("You must enter Good Afternoon Ethan")
Else
_text = Value
End If
End Set
End Property
Public Property Color() As String
Get
Return _color
End Get
Set(ByVal Value As String)
_color = Value
End Set
End Property
Protected Overrides Sub Render(ByVal output As HtmlTextWriter)
output.AddAttribute("color", _color)
output.RenderBeginTag("font")
output.Write(_text)
output.RenderEndTag()
End Sub
End Class
End Namespace
Thanks for the help.
Dolphin Bay, Inc. -- turning visions into eReality(tm) -- West Palm Beach, FL
Website Design, Internet Strategy, Search Engine Marketing
www.DolphinBay.biz