vb file:
---------------------
Imports System
Imports System.Web
Imports System.Web.UI
Namespace myControls
Public Class ShowColor: Inherits Control
Public Text As String
Public Color As String
Protected Overrides Sub Render( objTextWriter As HtmlTextWriter )
objTextWriter.AddAttribute( "Color", Color )
objTextWriter.RenderBeginTag( "Font" )
objTextWriter.Write( Text )
objTextWriter.RenderEndTag()
End Sub
End Class
End Namespace
---------------
HTML page:
<%@ Register TagPrefix="myControls" Namespace="myControls"
Assembly="ShowColor"%>
<html>
<head><title>DisplayShowColor.aspx</title></head>
<body>
<myControls:ShowColor
Text="Hello World!"
Color="Red"
Runat="Server" />
</body>
</html>
This is a very simple example but you should get the idea.