ASP.NET WidthProperty


Web 控件标准属性参考手册Web Control Standard Property Reference Manual

Definition and Usage

The Width property is used to set or return the width of the control.

Syntax

<asp:webcontrol id="id" Width="value" runat="server" />

Property Description
value The width of the control. Must be a pixel value, or a percentage value representing the width of the parent object.


Example

The following example sets the width of the Button control:

<form runat="server">
<asp:Button id="button1" Text="Submit"
Width="150px" runat="server" />
</form>

Demo »

Web 控件标准属性参考手册Web Control Standard Property Reference Manual Other Extensions