显示label 信息
asp教程:label id="lblmessage" runat="server"/>
标签在页面加载事件监听文本
label增加css教程
untitled page
this is sample unformatted text.
here's more unformatted text.
this control uses the blocktext style. this control uses the blocktext style. this
control uses the blocktext style. this control uses the blocktext style.
字体增加
asp.net教程 server controls - basics
file: default.aspx.cs
using system;
using system.data;
using system.configuration;
using system.web;
using system.web.security;
using system.web.ui;
using system.web.ui.webcontrols;
using system.web.ui.webcontrols.webparts;
using system.web.ui.htmlcontrols;public partial class _default : system.web.ui.page
{
protected void lbltime_init(object sender, eventargs e)
{
lbltime.font.name = "verdana";
lbltime.font.size = 20;
lbltime.font.underline = true;
lbltime.font.bold = true;
lbltime.font.italic = true;
lbltime.font.overline = true;
lbltime.font.strikeout = true;
lbltime.text = datetime.now.tostring() + ". font name: " + lbltime.font.name;
}}
设置lebel运行代码
page language = 'vb'