The SeriesViewer user control

All of the functionality of the web viewer is encapsulated inside a user control (a class inherited from Windows.Forms.UserControl). This makes maintenance and deployment much easier, and allows you to download the viewer to the client side through an HTML object tag, as shown below:

protected override void RenderContents(HtmlTextWriter writer) 
{ 
       writer.AddAttribute(HtmlTextWriterAttribute.Id, ClientID + "_OBJECT");
       writer.AddAttribute(HtmlTextWriterAttribute.Width, Width.ToString());
       writer.AddAttribute(HtmlTextWriterAttribute.Height, Height.ToString());
       writer.AddAttribute("classid", 
            @"http:Viewer\Leadtools.MedicalViewer.CS.WinForms.dll#Leadtools.MedicalViewer.CS.WinForms.Series.SeriesViewer"); 
       writer.RenderBeginTag(HtmlTextWriterTag.Object);
       …………………………. 
       …………………………. 
}