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

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

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

BackImageUrl プロパティを使用して、DetailsView コントロールの背景にカスタム イメージを表示する方法のコード例を次に示します。この例を動作させるには、独自のイメージを用意する必要があります。
<%@ Page language="VB" %> <html> <body> <form id="Form1" runat="server"> <h3>DetailsView BackImageUrl Example</h3> <asp:detailsview id="CustomerDetailView" datasourceid="DetailsViewSource" datakeynames="CustomerID" autogeneraterows="true" allowpaging="true" backimageurl="~\images\BackgroundImage.jpg" runat="server"> <headerstyle backcolor="Navy" forecolor="White"/> </asp:detailsview> <!-- 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="DetailsViewSource" runat="server" ConnectionString= "<%$ ConnectionStrings:NorthWindConnectionString%>" InsertCommand="INSERT INTO [Customers]([CustomerID], [CompanyName], [Address], [City], [PostalCode], [Country]) VALUES (@CustomerID, @CompanyName, @Address, @City, @PostalCode, @Country)" SelectCommand="Select [CustomerID], [CompanyName], [Address], [City], [PostalCode], [Country] From [Customers]"> </asp:SqlDataSource> </form> </body> </html>
<%@ Page language="C#" %> <html> <body> <form id="Form1" runat="server"> <h3>DetailsView BackImageUrl Example</h3> <asp:detailsview id="CustomerDetailView" datasourceid="DetailsViewSource" datakeynames="CustomerID" autogeneraterows="true" allowpaging="true" backimageurl="~\images\BackgroundImage.jpg" runat="server"> <headerstyle backcolor="Navy" forecolor="White"/> </asp:detailsview> <!-- 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="DetailsViewSource" runat="server" ConnectionString= "<%$ ConnectionStrings:NorthWindConnectionString%>" InsertCommand="INSERT INTO [Customers]([CustomerID], [CompanyName], [Address], [City], [PostalCode], [Country]) VALUES (@CustomerID, @CompanyName, @Address, @City, @PostalCode, @Country)" SelectCommand="Select [CustomerID], [CompanyName], [Address], [City], [PostalCode], [Country] From [Customers]"> </asp:SqlDataSource> </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に収録されているすべての辞書からDetailsView.BackImageUrl プロパティを検索する場合は、下記のリンクをクリックしてください。

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