01.
using
System;
02.
using
System.Data;
03.
using
System.Configuration;
04.
using
System.Collections;
05.
using
System.Web;
06.
using
System.Web.Security;
07.
using
System.Web.UI;
08.
using
System.Web.UI.WebControls;
09.
using
System.Web.UI.WebControls.WebParts;
10.
using
System.Web.UI.HtmlControls;
11.
12.
public
partial
class
Attribute : System.Web.UI.Page
13.
{
14.
protected
void
Page_Load(
object
sender, EventArgs e)
15.
{
16.
17.
{
18.
this
.lblText.Attributes.Add(
"OnClick"
,
"alert('Sawatdee');"
);
19.
this
.lblText.Style.Add(
"cursor"
,
"hand"
);
20.
}
21.
22.
23.
{
24.
this
.hplText.NavigateUrl =
"#"
;
25.
this
.hplText.Attributes.Add(
"OnClick"
,
"fncTest();"
);
26.
}
27.
28.
29.
{
30.
this
.btnSubmit.Attributes.Add(
"Onclick"
,
"return confirm('Do you want to...?');"
);
31.
this
.btnSubmit.Style.Add(
"cursor"
,
"hand"
);
32.
}
33.
}
34.
}