ASP.NET Mobile Label Control |
|||||||||||||||||||||||||||||||||||||||||
| 作者:佚名 来源:本站整理 发布时间:2008-3-14 20:43:03 | |||||||||||||||||||||||||||||||||||||||||
Definition and Usage
|
| Property 属性 |
Value 值 |
Description 描述 |
|---|---|---|
| Alignment | left center right |
Optional. How to align the label 可选参数。指定标签的对齐方式 |
| BackColor | rgb(x,x,x) #xxxxxx colorname |
Optional. A background color for the label 可选参数。指定标签的背景颜色 |
| ForeColor | rgb(x,x,x) #xxxxxx colorname |
Optional. A foreground color for the label 可选参数。指定标签的前景颜色 |
| Font-Bold | false true |
Optional. Specifies whether or not the text in the label should be bold 可选参数。指定标签文本字体是否以粗体显示 |
| Font-Italic | false true |
Optional. Specifies whether or not the text in the label should be italic 可选参数。指定标签文本字体是否以斜体显示 |
| Font-Name | fontname | Optional. Specifies the font name of the text in the label 可选参数。指定标签文本的字体名称 |
| Font-Size | normal small large |
Optional. Specifies the font size of the text in the label 可选参数。指定标签文本的字体大小 |
| id | unique_name | Optional. A unique id for the control 可选参数。为一个控件指定一个独立的id |
| runat | "server" | Required. Specifies that the control is a server control 必要参数。指定某控件为一个服务器控件 |
| StyleReference | name_of_style_element | Optional. Specifies a reference to a style to be applied to the control 可选参数。指定一个应用于控件的样式参数 |
| Text | text | Optional. The text to display in the label 可选参数。指定标签的显示文本 |
| Wrapping | wrap nowrap |
Optional. Specifies whether or not the text in the label should wrap 可选参数。指定标签中的文本是否可以被嵌套 |
Example 1
案例1
The following example will display "Hello W3Schools" in a Label control in an .aspx file:
下面这个案例将在 .aspx 文件中的标签控件上显示“Hello W3POP”:
<%@ Page <Mobile:Form runat="server"> |
Example 2
案例2
The following example will declare two forms in an .aspx file. The first form has a label with the text "Age?", an input box to input the age, and a submit button. The second form is activated by the submit button on the first form, and displays a response:
下面这个案例将在一个 .aspx文件中声明两个表单。第一张表单包含名为 “Age?”的标签,一个输入框和一个提交按钮。第二个表单将通过第一个表单的提交按钮激活,并显示一段回应文字:
<%@ Page <script runat="server"> <Mobile:Form id="form1" runat="server"> <Mobile:Form id="form2" runat="server" |
