<%@ Page Language="VB" %>
<%@ Register TagPrefix="Java2sASP" Namespace="MyCustomControls" Assembly="CustomControls"%>
<html><body>
<form runat=server>
The custom control produces the following output:
<Java2sASP:CustomControl1 id="MyControl" runat=server/>
</form>
</body></html>
//////C#
using System;
using System.Web;
using System.Web.UI;
namespace MyCustomControls {
public class CustomControl1 : Control {
protected override void Render(HtmlTextWriter Output) {
Output.Write("This is my custom control! ");
}
}
}
//////VB
Imports System
Imports System.Web
Imports System.Web.UI
Namespace MyCustomControls
Public Class CustomControl1 : Inherits Control
Protected Overrides Sub Render(Output as HtmlTextWriter)
Output.Write("This is my custom control! ")
End Sub
End Class
End Namespace
|