BulletedList.Target プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > BulletedList.Target プロパティの意味・解説 

BulletedList.Target プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

BulletedList コントロールハイパーリンククリックされたときに、リンク先Web ページ内容表示するウィンドウまたはフレーム取得または設定します

名前空間: System.Web.UI.WebControls
アセンブリ: System.Web (system.web.dll 内)
構文構文

解説解説

値は、次の表に記載されているアンダースコア (_) から始まる特殊な値除き大文字小文字区別しない A から Z の範囲文字で始まる必要があります

説明

_blank

フレームなしの新しウィンドウ内容表示します

_parent

直前のフレームセットの親に内容表示します

_search

検索ペイン内容表示します

_self

フォーカスのあるフレーム内容表示します

_top

最大化されたフレームなしのウィンドウ内容表示します

BulletedList コントロールハイパーリンククリックされたときに移動する Web ページ表示するフレームまたはウィンドウ指定するには、Target プロパティ使用しますBulletedList コントロールリスト項目の内容ハイパーリンクとして表示するには、BulletedListDisplayMode プロパティに値 HyperLink設定しますその後、各リスト項目の Value プロパティに、移動先となる Web ページURL設定します

Target プロパティ設定されていない場合ハイパーリンククリックされたときに、フォーカスがあるブラウザまたはウィンドウ更新されます。

このプロパティの値はビューステート格納されます。

使用例使用例

BulletedList コントロール作成してTarget プロパティ設定する方法を、次のコード例示しますユーザーリスト ボックスから HyperLink 表示モード選択すると、Target プロパティには _blank設定され新しブラウザ ウィンドウリンク先ページ表示されるようになります

<%@ Page Language="VB" %>

<html>
<head>
    <script runat="server">

        Sub Index_Changed(ByVal sender As
 Object, ByVal e As System.EventArgs)

            ' Change the message displayed, based on 
            ' the display mode selected from the list box.
            If DisplayModeListBox.SelectedIndex > -1 Then
                Message1.Text = "You chose: " &
 DisplayModeListBox.SelectedItem.Text
            End If

            ' Change the display mode, based on 
            ' the mode selected from the list box.
            Select Case (DisplayModeListBox.SelectedIndex)
                Case 0
                    ItemsBulletedList.DisplayMode = BulletedListDisplayMode.Text
                    Message2.Text = ""
                Case 1
                    ItemsBulletedList.DisplayMode = BulletedListDisplayMode.HyperLink
                    ' Opens a new browser window to display the page
 linked to.
                    ItemsBulletedList.Target = "_blank"
                    Message2.Text = ""
                Case 2
                    ItemsBulletedList.DisplayMode = BulletedListDisplayMode.LinkButton
                Case Else
                    Throw New Exception("You
 did not select a valid display mode.")
            End Select

        End Sub

        Sub ItemsBulletedList_Click(ByVal sender
 As Object, ByVal e As
 System.Web.UI.WebControls.BulletedListEventArgs)

            ' Change the message displayed, based on the index
            ' of the bulletedlist list item that was clicked.
            Select Case (e.Index)
                Case 0
                    Message2.Text = "You  clicked list item 1."
                Case 1
                    Message2.Text = "You  clicked list item 2."
                Case 2
                    Message2.Text = "You  clicked list item 3."
                Case Else
                    Throw New Exception("You
 did not click a valid list item.")
            End Select

        End Sub
      
</script>

</head>
<body>

    <h3>DisplayMode Example</h3>

    <form ID="Form1" runat="server">
  
    <h3>BulletedListDisplayMode Example</h3>

    <asp:BulletedList id="ItemsBulletedList" 
        BulletStyle="Disc"
        DisplayMode="Text" 
        OnClick="ItemsBulletedList_Click"
        runat="server">    
        <asp:ListItem Value="http://www.cohowinery.com">Coho
 Winery</asp:ListItem>
        <asp:ListItem Value="http://www.contoso.com">Contoso,
 Ltd.</asp:ListItem>
        <asp:ListItem Value="http://www.tailspintoys.com">Tailspin
 Toys</asp:ListItem>
    </asp:BulletedList></P>    

        <hr>      
                         
        <h4>Select from the list to change the display mode:</h4>
            
    <asp:ListBox id="DisplayModeListBox" 
        Rows="1"
            SelectionMode="Single"
            AutoPostBack="True"
            OnSelectedIndexChanged="Index_Changed"
        runat="server">             
            <asp:ListItem>Text</asp:ListItem>
            <asp:ListItem>Hyperlink</asp:ListItem>
            <asp:ListItem>LinkButton</asp:ListItem>
    </asp:ListBox>    
        
    <asp:Label id="Message1" 
        runat="server"/><br><br>

        <asp:Label id="Message2"
            runat="server"/>         
             
   </form>

</body>
</html>
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からBulletedList.Target プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からBulletedList.Target プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からBulletedList.Target プロパティ を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

BulletedList.Target プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



BulletedList.Target プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS