Figure 1 A Simple Control

Simple Control


using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace MSDNSamples
    public class SimpleCtl : Control
        public SimpleCtl() {}

        protected override void Render(HtmlTextWriter output)
            string htmlText = "<head> What's up? </head>";
Figure 3 A Simple Control in Visual Basic
Imports System
Imports System.Web.UI

Namespace MSDNSamples
Public Class SimpleCtlInVB
Inherits Control
Overrides Sub Render (writer as HtmlTextWriter)
Writer.Write("<h1>What's up in Visual Basic? </h1>")
End sub
End class
End namespace

MSDN Magazine Blog

MSDN Magazine Right Rail

14 Top Features of Visual Basic 14: The Q&A
Leading off the feature in the January issue of MSDN Magazine is Lucian Wischik’s fantastic look at Visual Basic .NET 14. As Wischik writes, the newes... More...
Wednesday, Jan 7
Big Start to the New Year at MSDN Magazine
Folks, things are hopping over here at MSDN Magazine. We are kicking off the new year with a pair of issues: Our regularly scheduled January issue and... More...
Friday, Jan 2

More MSDN Magazine Blog entries >

Receive the MSDN Flash e-mail newsletter every other week, with news and information personalized to your interests and areas of focus.