Public Class Attribute
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
'*** Label ***'
With Me.lblText
.Attributes.Add("OnClick", "alert('Sawatdee');")
.Style.Add("cursor", "hand")
End With
'*** Hyperlink ***'
With Me.hplText
.NavigateUrl = "#"
.Attributes.Add("OnClick", "fncTest();")
End With
'*** Button ***'
With Me.btnSubmit
.Attributes.Add("Onclick", "return confirm('Do you want to...?');")
.Style.Add("cursor", "hand")
End With
End Sub
End Class