반응형
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] |
반응형
'ASP.NET' 카테고리의 다른 글
| 18.C# ASP.NET - Button 컨트롤 [WebStandardControl] (0) | 2009.10.06 |
|---|---|
| 17.C# ASP.NET - TextBox 컨트롤 [WebStandardControl] (0) | 2009.10.06 |
| 15.C# ASP.NET - Lable, TextBox, Button 컨트롤 [WebStandardControl] (0) | 2009.10.06 |
| 14.C# ASP.NET - PageLoad (0) | 2009.10.05 |
| 13.C# ASP.NET - Application.Session (0) | 2009.10.05 |
16Lable.zip
Comments