ASP.NET Width 屬性


Style 控件 Style 控件

定義和用法

Width 屬性用於設置或返回控件的寬度。

語法

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

屬性 描述
value 控件的寬度。必須是像素值,或表示父對象寬度的百分比值。


實例

下麵的實例設置了 Button 控件的寬度:

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


Style 控件 Style 控件