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

Dim instance As FormView Dim value As String value = instance.BackImageUrl instance.BackImageUrl = value
/** @property */ public String get_BackImageUrl () /** @property */ public void set_BackImageUrl (String value)
FormView コントロールの背景に表示するイメージの URL。既定値は空の文字列 ("") です。この値は、このプロパティが設定されていないことを示します。

BackImageUrl プロパティを使用して、FormView コントロールの背景に表示するイメージの URL を指定します。
![]() |
---|
指定したイメージが FormView コントロールよりも小さい場合、そのイメージはコントロールの背景を埋めるように並べて表示されます。イメージがコントロールよりも大きい場合、イメージはトリミングされます。 |

BackImageUrl プロパティを使用して、FormView コントロールの背景にカスタム イメージを表示する方法を次の例に示します。
<%@ Page language="VB" %> <html> <body> <form runat="server"> <h3>FormView BackImageUrl Example</h3> <asp:formview id="EmployeeFormView" datasourceid="EmployeeSource" allowpaging="true" datakeynames="EmployeeID" backimageurl="~/Images/Background.jpg" 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 BackImageUrl Example</h3> <asp:formview id="EmployeeFormView" datasourceid="EmployeeSource" allowpaging="true" datakeynames="EmployeeID" backimageurl="~/Images/Background.jpg" 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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


FormView クラス
FormView メンバ
System.Web.UI.WebControls 名前空間
CellPadding
CellSpacing
GridLines
HorizontalAlign
Weblioに収録されているすべての辞書からFormView.BackImageUrl プロパティを検索する場合は、下記のリンクをクリックしてください。

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