ASP.NET
16.C# ASP.NET - Lable 컨트롤 [WebStandardControl]
Godffs
2009. 10. 6. 11:09
반응형
Lable 컨트롤을 이용한 예제입니다.
| FrmLable.aspx |
|
<div>
1~100까지 짝수의 합 :
<asp:Label ID="Label1" runat="server" Text="Label"
ForeColor="Red" BackColor="Yellow"
BorderColor="Blue" BorderStyle="Solid" BorderWidth="1px"></asp:Label>
<br />
올 크리스마스가 며칠 남았는지? : <br />
<asp:Label ID="Label2" runat="server" Text="Label"></asp:Label> </div> |
| FrmLable.aspx.cs |
|
protected void Page_Load(object
sender, EventArgs
e) {
DisplayEven();
DisplayXmas(); } private void DisplayXmas() {
this.Label2.Text = "30일 남았다."; } private void DisplayEven() {
Label1.Text = "<b><s>2550</s></b>"; } |
| 결과화면 |
[그림16-1] |
반응형
16Lable.zip