Hyper link custom control code

zhaozj2021-02-16  82

Imports System.comPonentmodelimports System.Web.uiimports System.Web.ui.WebControlsimports System

Public Class WebcustomControl1: Inherits System.Web.ui.Control

Protected Overrides Sub Render (Byval Output As System.Web.ui.htmlTextWriter)

output.AddAttribute (HtmlTextWriterAttribute.Href, "http://www.163.com") output.AddAttribute (HtmlTextWriterAttribute.Target, "_blank") output.AddStyleAttribute (HtmlTextWriterStyle.FontSize, "100") output.AddStyleAttribute (HtmlTextWriterStyle. Color, "Green") Output.Renderbegintag (HTMLTextWritrtag.a) Output.write ("this is a line" output.renderendtag ()

End Sub

END CLASS

转载请注明原文地址:https://www.9cbs.com/read-12740.html

New Post(0)