FormView.HorizontalAlign プロパティ
アセンブリ: System.Web (system.web.dll 内)

Dim instance As FormView Dim value As HorizontalAlign value = instance.HorizontalAlign instance.HorizontalAlign = value
public: virtual property HorizontalAlign HorizontalAlign { HorizontalAlign get (); void set (HorizontalAlign value); }
/** @property */ public HorizontalAlign get_HorizontalAlign () /** @property */ public void set_HorizontalAlign (HorizontalAlign value)
public function get HorizontalAlign () : HorizontalAlign public function set HorizontalAlign (value : HorizontalAlign)
HorizontalAlign 値の 1 つ。既定値は HorizontalAlign.NotSet です。

HorizontalAlign プロパティを使用して、ページ内の FormView コントロールの水平方向の配置を指定します。さまざまな水平方向の配置の一覧を次の表に示します。
HorizontalAlign の値 | |
---|---|
HorizontalAlign.NotSet | |
HorizontalAlign.Left | |
HorizontalAlign.Center | |
HorizontalAlign.Right | |
HorizontalAlign.Justify |

HorizontalAlign プロパティを使用して、FormView コントロールがページ上に中央揃えで表示されるように指定する方法を次の例に示します。
<%@ Page language="VB" %> <html> <body> <form runat="server"> <h3>FormView HorizontalAlign Example</h3> <asp:formview id="EmployeeFormView" datasourceid="EmployeeSource" allowpaging="true" datakeynames="EmployeeID" horizontalalign="Center" gridlines="Both" runat="server"> <itemtemplate> <table> <tr> <td> <asp:image id="EmployeeImage" imageurl='<%# Eval("PhotoPath") %>' alternatetext='<%# Eval("LastName") %>' runat="server"/> </td> <td> <h3><%# Eval("FirstName") %> <%# Eval("LastName") %></h3> <%# Eval("Title") %> </td> </tr> </table> </itemtemplate> <pagersettings position="Bottom" mode="NextPrevious"/> </asp:formview> <!-- This example uses Microsoft SQL Server and connects --> <!-- to the Northwind sample database. Use an ASP.NET --> <!-- expression to retrieve the connection string value --> <!-- from the Web.config file. --> <asp:sqldatasource id="EmployeeSource" selectcommand="Select [EmployeeID], [LastName], [FirstName], [Title], [PhotoPath] From [Employees]" connectionstring="<%$ ConnectionStrings:NorthWindConnectionString%>" runat="server"/> </form> </body> </html>
<%@ Page language="C#" %> <html> <body> <form runat="server"> <h3>FormView HorizontalAlign Example</h3> <asp:formview id="EmployeeFormView" datasourceid="EmployeeSource" allowpaging="true" datakeynames="EmployeeID" horizontalalign="Center" gridlines="Both" runat="server"> <itemtemplate> <table> <tr> <td> <asp:image id="EmployeeImage" imageurl='<%# Eval("PhotoPath") %>' alternatetext='<%# Eval("LastName") %>' runat="server"/> </td> <td> <h3><%# Eval("FirstName") %> <%# Eval("LastName") %></h3> <%# Eval("Title") %> </td> </tr> </table> </itemtemplate> <pagersettings position="Bottom" mode="NextPrevious"/> </asp:formview> <!-- This example uses Microsoft SQL Server and connects --> <!-- to the Northwind sample database. Use an ASP.NET --> <!-- expression to retrieve the connection string value --> <!-- from the Web.config file. --> <asp:sqldatasource id="EmployeeSource" selectcommand="Select [EmployeeID], [LastName], [FirstName], [Title], [PhotoPath] From [Employees]" connectionstring="<%$ ConnectionStrings:NorthWindConnectionString%>" runat="server"/> </form> </body> </html>

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からFormView.HorizontalAlign プロパティを検索する場合は、下記のリンクをクリックしてください。

- FormView.HorizontalAlign プロパティのページへのリンク